Update backup.sh
This commit is contained in:
parent
9e918e964b
commit
80b1f95a72
@ -43,10 +43,10 @@ fi
|
||||
|
||||
# Copy the database and website backup
|
||||
if [ -n "$database_name" ]; then
|
||||
rclone copy /opt/backup/dbbackup-$backup_folder_name.tar.gz $rclone_config_name:$s3_bucket_name/$backup_folder_name
|
||||
rclone copy /opt/backup/dbbackup-$backup_folder_name.sql.gz $rclone_config_name:$s3_bucket_name/$backup_folder_name -P --s3-no-check-bucket
|
||||
fi
|
||||
|
||||
rclone copy /opt/backup/website-$backup_folder_name.tar.gz $rclone_config_name:$s3_bucket_name/$backup_folder_name
|
||||
rclone copy /opt/backup/website-$backup_folder_name.tar.gz $rclone_config_name:$s3_bucket_name/$backup_folder_name -P --s3-no-check-bucket
|
||||
|
||||
# Purge old backups for more than 7 days
|
||||
rclone purge $rclone_config_name:$s3_bucket_name/$(date -d "7 days ago" "+%Y_%m_%d")
|
Loading…
Reference in New Issue
Block a user