1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/diacamma_ynh.git synced 2024-09-03 18:26:10 +02:00

correct backup/restore

This commit is contained in:
Laurent GAY 2023-12-14 20:38:27 +01:00
parent bd4fee943d
commit fe21defa68
3 changed files with 2 additions and 5 deletions

View file

@ -21,8 +21,7 @@ ynh_backup --src_path="/etc/systemd/system/$app.service"
#=================================================
ynh_print_info --message="Backing up the postgresql database..."
### (However, things like MySQL dumps *do* take some time to run, though the
### copy of the generated dump to the archive still happens later)
ynh_psql_dump_db --database="$db_name" > dbbackup.sql
#=================================================
# END OF SCRIPT

View file

@ -20,8 +20,6 @@ ynh_remove_nginx_config
ynh_remove_logrotate
ynh_remove_fail2ban_config
ynh_secure_remove --file="/var/log/$app"
#=================================================

View file

@ -27,7 +27,7 @@ check_params
ynh_script_progression --message="Restoring the PostgreSQL database..." --weight=1
ynh_psql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql
ynh_psql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < dbbackup.sql
#=================================================
# RESTORE SYSTEM CONFIGURATIONS