Sped up transfer
This commit is contained in:
parent
3a1d855dff
commit
6db4cd43fe
@ -19,7 +19,7 @@ fi
|
|||||||
backup_dir="/mnt/USB/Backup/"$(date +'%Y/%m/%d')
|
backup_dir="/mnt/USB/Backup/"$(date +'%Y/%m/%d')
|
||||||
backup_dir_remote="/media/backup/"$(date +'%Y/%m/%d')
|
backup_dir_remote="/media/backup/"$(date +'%Y/%m/%d')
|
||||||
nextcloud_dir="/var/www/nextcloud"
|
nextcloud_dir="/var/www/nextcloud"
|
||||||
remote_ip="192.168.178.59"
|
remote_ip="192.168.178.8"
|
||||||
|
|
||||||
# Shuting down services for backup
|
# Shuting down services for backup
|
||||||
cd $nextcloud_dir
|
cd $nextcloud_dir
|
||||||
@ -45,9 +45,9 @@ if [ "$1" = "-d" ]
|
|||||||
# Create remote directory
|
# 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
|
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
|
# copy the shit over
|
||||||
sudo screen -dmS backup -t backup bash -c "rsync -Aar --progress -e ssh /tmp/nextcloud.sql backup-user@$remote_ip:$backup_dir_remote/mysql/;
|
sudo screen -dmS backup -t backup bash -c "rsync -WAXart -4 --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 -WAXarzt -4 --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;"
|
rsync -XWAarzt -4 --progress -e ssh $nextcloud_dir/ backup-user@$remote_ip:$backup_dir_remote/nextcloud;"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Start back up
|
# Start back up
|
||||||
|
Loading…
Reference in New Issue
Block a user