switch backup order

This commit is contained in:
Johannes Schmelz 2021-01-08 00:04:33 +01:00
parent 3ed9c27162
commit 3a1d855dff

View File

@ -45,9 +45,9 @@ if [ "$1" = "-d" ]
# Create remote directory
sudo ssh backup-user@$remote_ip mkdir -p $backup_dir_remote/gitea mkdir $backup_dir_remote/nextcloud mkdir $backup_dir_remote/mysql
# copy the shit over
sudo screen -dmS backup -t backup bash -c "rsync -Aarz --progress -e ssh $nextcloud_dir/ backup-user@$remote_ip:$backup_dir_remote/nextcloud;
rsync -Aar --progress -e ssh /tmp/nextcloud.sql backup-user@$remote_ip:$backup_dir_remote/mysql/;
rsync -Aarz --progress -e ssh /tmp/gitea-dump/backup.zip backup-user@$remote_ip:$backup_dir_remote/gitea/"
sudo screen -dmS backup -t backup bash -c "rsync -Aar --progress -e ssh /tmp/nextcloud.sql backup-user@$remote_ip:$backup_dir_remote/mysql/;
rsync -Aarz --progress -e ssh /tmp/gitea-dump/backup.zip backup-user@$remote_ip:$backup_dir_remote/gitea/
rsync -Aarz --progress -e ssh $nextcloud_dir/ backup-user@$remote_ip:$backup_dir_remote/nextcloud;"
fi
# Start back up