added extra parameter for sftp
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -61,14 +61,14 @@ rm ~/$BACKUP_FILENAME
|
|||||||
echo "uploading"
|
echo "uploading"
|
||||||
if [ "$USE_SFTP" -eq 1 ]; then
|
if [ "$USE_SFTP" -eq 1 ]; then
|
||||||
cd ~/
|
cd ~/
|
||||||
sshpass -e sftp -oBatchMode=no -b - ${SFTP_USER}@${SFTP_HOST} << !
|
sshpass -e sftp -oBatchMode=no ${SFTP_EXTRA} -b - ${SFTP_USER}@${SFTP_HOST} << !
|
||||||
cd ${SFTP_PATH}
|
cd ${SFTP_PATH}
|
||||||
put ${BACKUP_FILENAME}.gpg
|
put ${BACKUP_FILENAME}.gpg
|
||||||
bye
|
bye
|
||||||
!
|
!
|
||||||
if [ "$month_day" -eq 1 ] ; then
|
if [ "$month_day" -eq 1 ] ; then
|
||||||
echo "make monthly backup"
|
echo "make monthly backup"
|
||||||
sshpass -e sftp -oBatchMode=no -b - ${SFTP_USER}@${SFTP_HOST} << !
|
sshpass -e sftp -oBatchMode=no ${SFTP_EXTRA} -b - ${SFTP_USER}@${SFTP_HOST} << !
|
||||||
cd ${SFTP_PATH}
|
cd ${SFTP_PATH}
|
||||||
cp ${BACKUP_FILENAME}.gpg ${BACKUP_FILENAME_MONTHLY}.gpg
|
cp ${BACKUP_FILENAME}.gpg ${BACKUP_FILENAME_MONTHLY}.gpg
|
||||||
bye
|
bye
|
||||||
|
|||||||
Reference in New Issue
Block a user