poesty 1 rok temu
rodzic
commit
d2e0e609bb
2 zmienionych plików z 8 dodań i 8 usunięć
  1. 4 4
      backup/backup_akkoma.sh
  2. 4 4
      update/update_akkoma.sh

+ 4 - 4
backup/backup_akkoma.sh

@@ -24,8 +24,8 @@ sed -i 's/\r//g' $AKKOMA_DBCONFIG_PATH
 sudo -Hu postgres pg_dump -d $AKKOMA_DB  --format=custom -f $BACKUP_PATH/akkoma.pgdump
 tar -czpPf - $AKKOMA_STATIC_PATH $AKKOMA_CONFIG_PATH $BACKUP_PATH/akkoma.pgdump $AKKOMA_DBCONFIG_PATH | gpg -e -r 0 > $BACKUP_PATH/akbk+$(date +%Y%m%d-%H%M%S).tar.gz.gpg
 
-# upload archive
-rclone copy /home/plbk/akbk+*.tar.gz.gpg od-1:/upload -vP
-
 # start akkoma
-systemctl start $AKKOMA_SERVICE
+systemctl start $AKKOMA_SERVICE
+
+# upload archive
+rclone copy /home/plbk/akbk+*.tar.gz.gpg od-1:/upload -vP

+ 4 - 4
update/update_akkoma.sh

@@ -24,9 +24,6 @@ sed -i 's/\r//g' $AKKOMA_DBCONFIG_PATH
 sudo -Hu postgres pg_dump -d $AKKOMA_DB  --format=custom -f $BACKUP_PATH/akkoma.pgdump
 tar -czpPf - $AKKOMA_STATIC_PATH $AKKOMA_CONFIG_PATH $BACKUP_PATH/akkoma.pgdump $AKKOMA_DBCONFIG_PATH | gpg -e -r 0 > $BACKUP_PATH/akbk+$(date +%Y%m%d-%H%M%S).tar.gz.gpg
 
-# upload archive
-rclone copy /home/plbk/akbk+*.tar.gz.gpg od-1:/upload -vP
-
 # update backend
 su $AKKOMA_USER -s $SHELL -lc "./bin/pleroma_ctl update --branch stable" && su $AKKOMA_USER -s $SHELL -lc "./bin/pleroma_ctl migrate"
 
@@ -34,4 +31,7 @@ su $AKKOMA_USER -s $SHELL -lc "./bin/pleroma_ctl update --branch stable" && su $
 systemctl start $AKKOMA_SERVICE
 
 # update frontend
-su $AKKOMA_USER -s $SHELL -lc "./bin/pleroma_ctl frontend install pleroma-fe --ref stable" && su $AKKOMA_USER -s $SHELL -lc "./bin/pleroma_ctl frontend install admin-fe --ref stable"
+su $AKKOMA_USER -s $SHELL -lc "./bin/pleroma_ctl frontend install pleroma-fe --ref stable" && su $AKKOMA_USER -s $SHELL -lc "./bin/pleroma_ctl frontend install admin-fe --ref stable"
+
+# upload archive
+rclone copy /home/plbk/akbk+*.tar.gz.gpg od-1:/upload -vP