allow sftp backup
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2021-05-27 06:47:09 +02:00
parent 674500b3f9
commit 5626dc78e6

View File

@@ -59,6 +59,23 @@ gpg --batch --trust-model always --enable-progress-filter --output ~/$BACKUP_FIL
rm ~/$BACKUP_FILENAME
echo "uploading"
if [ "$USE_SFTP" -eq 1 ]; then
cd ~/
sshpass -e sftp -oBatchMode=no -b - ${SFTP_USER}@${SFTP_HOST} << !
cd ${SFTP_PATH}
put ${BACKUP_FILENAME}.gpg
bye
!
if [ "$month_day" -eq 1 ] ; then
echo "make monthly backup"
sshpass -e sftp -oBatchMode=no -b - ${SFTP_USER}@${SFTP_HOST} << !
cd ${SFTP_PATH}
cp ${BACKUP_FILENAME}.gpg ${BACKUP_FILENAME_MONTHLY}.gpg
bye
!
fi
rm ~/$BACKUP_FILENAME.gpg
else
AWS_ENDPOINT_OPTION=
AWS_STORAGECLASS_OPTION="--storage-class DEEP_ARCHIVE"
if [ "$AWS_USE_MINIO" -eq 1 ] ; then