Bläddra i källkod

Update backup_akkoma.sh

We can start Akkoma before compressing backup files, therefore the service will restart a little faster
poesty 9 månader sedan
förälder
incheckning
c0d735f6d8
1 ändrade filer med 6 tillägg och 4 borttagningar
  1. 6 4
      backup/backup_akkoma.sh

+ 6 - 4
backup/backup_akkoma.sh

@@ -24,14 +24,16 @@ sed -i 's/\r//g' $AKKOMA_DBCONFIG_PATH
 # stop akkoma
 systemctl stop $AKKOMA_SERVICE
 
-# backup database/config.exs/static files
+# backup database
 sudo -Hu postgres pg_dump -d $AKKOMA_DB  --format=custom -f $BACKUP_PATH/akkoma.pgdump
+
+# start akkoma in background
+nohup systemctl start $AKKOMA_SERVICE >&/dev/null &
+
+# backup config.exs/static files
 tar -czpPf - $AKKOMA_STATIC_PATH $AKKOMA_CONFIG_PATH $BACKUP_PATH | gpg -e -r 0 > $BACKUP_PATH.tar.gz.gpg
 rm -r $BACKUP_PATH
 
-# start akkoma
-systemctl start $AKKOMA_SERVICE
-
 # upload archive
 rclone copy $BACKUP_PATH.tar.gz.gpg od-1:/upload -vP