From a096a7eb3bdcf0f5a0391ad6b19bf0cff842773e Mon Sep 17 00:00:00 2001 From: Tio <38043315+tio-trom@users.noreply.github.com> Date: Mon, 21 Aug 2023 01:54:04 +0200 Subject: [PATCH] Put Friendica in maintenance mode If we do not put Friendica in maintenance mode before we backup, then the backups will fail if you have an active instance. New entries will add up in the database before it finishes dumping it. --- scripts/backup | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/backup b/scripts/backup index 0eba6fa..46aa505 100644 --- a/scripts/backup +++ b/scripts/backup @@ -21,6 +21,10 @@ ynh_clean_setup () { # Exit if an error occurs during the execution of the script ynh_abort_if_errors +# Put Friendica in maintenance mode +cd /var/www/friendica +bin/console maintenance 1 + #================================================= # LOAD SETTINGS #================================================= @@ -74,4 +78,8 @@ ynh_mysql_dump_db --database="$db_name" > db.sql # END OF SCRIPT #================================================= +# Disable the Friendica maintenance mode +cd /var/www/friendica +bin/console maintenance 0 + ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)."