mirror of
https://github.com/YunoHost-Apps/friendica_ynh.git
synced 2024-09-03 18:36:14 +02:00
Enable the Maintenance mode for the Friendica backup script
This is done to avoid errors with the database and be able to properly back it up. Else it will fail if you Friendica is an active instance and in the time that it takes to create a backup new entries will be added to the database. I tested it it works.
This commit is contained in:
parent
dc7cd3eabe
commit
330c20bad1
1 changed files with 9 additions and 0 deletions
|
@ -63,6 +63,10 @@ ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
||||||
# Backup cron job
|
# Backup cron job
|
||||||
ynh_backup --src_path="/etc/cron.d/$app"
|
ynh_backup --src_path="/etc/cron.d/$app"
|
||||||
|
|
||||||
|
# Put Friendica in maintenance mode
|
||||||
|
ynh_print_info --message="Enabling the maintenance mode for Friendica"
|
||||||
|
/var/www/friendica/bin/console maintenance 1
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# BACKUP THE MYSQL DATABASE
|
# BACKUP THE MYSQL DATABASE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -70,8 +74,13 @@ ynh_print_info --message="Backing up the MySQL database..."
|
||||||
|
|
||||||
ynh_mysql_dump_db --database="$db_name" > db.sql
|
ynh_mysql_dump_db --database="$db_name" > db.sql
|
||||||
|
|
||||||
|
# Disable the maintenance mode for Friendica
|
||||||
|
ynh_print_info --message="Disabling the maintenance mode for Friendica"
|
||||||
|
/var/www/friendica/bin/console maintenance 0
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# END OF SCRIPT
|
# END OF SCRIPT
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
|
|
||||||
ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)."
|
ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)."
|
||||||
|
|
Loading…
Add table
Reference in a new issue