Cleaned gitea duplicates

This commit is contained in:
Johannes Schmelz 2021-01-07 15:21:56 +01:00
parent ff8d504847
commit 2051d545a5

View File

@ -32,8 +32,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"
#gitea_dir="/var/" remote_ip="192.168.178."
remote_ip="192.168.178.48"
# Back the fuck up bro... # Back the fuck up bro...
# Shuting down services for backup # Shuting down services for backup
@ -47,8 +46,7 @@ sudo -u git /usr/local/bin/gitea dump --config /etc/gitea/app.ini --file "/tmp/g
# Create rote directory # Create rote directory
sudo ssh backup@$remote_ip sudo mkdir -p $backup_dir_remote/gitea mkdir $backup_dir_remote/nextcloud mkdir $backup_dir_remote/mysql sudo ssh backup@$remote_ip sudo 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 -Aavr --progress -e ssh $nextcloud_dir backup-user@$remote_ip:$backup_dir_remote/nextcloud; sudo screen -dmS backup -t backup bash -c "rsync -Aavr --progress -e ssh $nextcloud_dir backup-user@$remote_ip:$backup_dir_remote/nextcloud;
rsync -Aavr --progress -e ssh $gitea_dir backup-user@$remote_ip:$backup_dir_remote/gitea;
rsync -Aavr --progress -e ssh /tmp/nextcloud.sql backup-user@$remote_ip:$backup_dir_remote/mysql/; rsync -Aavr --progress -e ssh /tmp/nextcloud.sql backup-user@$remote_ip:$backup_dir_remote/mysql/;
rsync -Aavr --progress -e ssh /tmp/gitea-dump/backup.zip backup-user@$remote_ip:$backup_dir_remote/gitea/" rsync -Aavr --progress -e ssh /tmp/gitea-dump/backup.zip backup-user@$remote_ip:$backup_dir_remote/gitea/"