This commit is contained in:
17
backup.sh
17
backup.sh
@@ -59,6 +59,23 @@ gpg --batch --trust-model always --enable-progress-filter --output ~/$BACKUP_FIL
|
|||||||
rm ~/$BACKUP_FILENAME
|
rm ~/$BACKUP_FILENAME
|
||||||
|
|
||||||
echo "uploading"
|
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_ENDPOINT_OPTION=
|
||||||
AWS_STORAGECLASS_OPTION="--storage-class DEEP_ARCHIVE"
|
AWS_STORAGECLASS_OPTION="--storage-class DEEP_ARCHIVE"
|
||||||
if [ "$AWS_USE_MINIO" -eq 1 ] ; then
|
if [ "$AWS_USE_MINIO" -eq 1 ] ; then
|
||||||
|
|||||||
Reference in New Issue
Block a user