Commit 4a59fb73 authored by root's avatar root

backup failed after restore

parent fcaec29c
......@@ -45,6 +45,8 @@ ynh_backup "/etc/nginx/conf.d/$app-cache.conf"
mkdir --parents $final_path/backup
chown postgres $final_path/backup
touch $final_path/backup/$db_name.sql
chown postgres $final_path/backup/$db_name.sql
su - postgres -c "pg_dump $db_name > $final_path/backup/$db_name.sql"
#=================================================
......@@ -52,6 +54,9 @@ su - postgres -c "pg_dump $db_name > $final_path/backup/$db_name.sql"
#=================================================
ynh_backup "$final_path"
# TODO: Check if I can remove _$final_path/backup/$db_name.sql_ after backup
# TODO: If _$final_path/backup/$db_name.sql_ can be removed, _touch $final_path/backup/$db_name.sql_ can be scratched
# TODO: If _$final_path/backup/$db_name.sql_ can be removed, _chown postgres $final_path/backup/$db_name.sql_ can be scratched
#================================================
# SPECIFIC BACKUP
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment