Fixed gitea dump
This commit is contained in:
parent
99fbed07e5
commit
3e1a919e06
@ -41,18 +41,19 @@ cd $nextcloud_dir
|
|||||||
sudo -u www-data php occ maintenance:mode --on
|
sudo -u www-data php occ maintenance:mode --on
|
||||||
sudo apache2 stop
|
sudo apache2 stop
|
||||||
sudo mysqldump --single-transaction nextcloud > /tmp/mysqldump/nextcloud.sql
|
sudo mysqldump --single-transaction nextcloud > /tmp/mysqldump/nextcloud.sql
|
||||||
cd /usr/local/bin
|
sudo mkdir /tmp/gitea-dump
|
||||||
sudo -u git ./gitea dump -c /etc/gitea/app.ini
|
sudo chown -R git:git /tmp/gitea-dump/
|
||||||
|
sudo -u git /usr/local/bin/gitea dump --config /etc/gitea/app.ini --file "/tmp/gitea-dump/backup.zip" --tempdir "/tmp/gitea-dump"
|
||||||
|
|
||||||
sudo ssh backup@$remote_ip sudo mkdir -p $backup_dir_remote
|
sudo ssh backup@$remote_ip sudo mkdir -p $backup_dir_remote/gitea mkdir $backup_dir_remote/nextcloud mkdir $backup_dir_remote/mysql
|
||||||
|
|
||||||
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 $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.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/"
|
||||||
|
|
||||||
#To-Do
|
#To-Do
|
||||||
# gitea dump permissions
|
|
||||||
# rsync test
|
# rsync test
|
||||||
# cleanup
|
# cleanup
|
||||||
# starting back up
|
# starting back up
|
Loading…
Reference in New Issue
Block a user