1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/mygpo_ynh.git synced 2024-09-03 19:55:52 +02:00

Old way backup

But, with a compatibility with the new system
This commit is contained in:
Maniack Crudelis 2017-06-05 13:27:24 +02:00 committed by GitHub
parent c03c9fc045
commit 947bde8284

View file

@ -38,27 +38,27 @@ db_pwd=$(ynh_app_setting_get $app mysqlpwd)
# BACKUP OF THE MAIN DIR OF THE APP # BACKUP OF THE MAIN DIR OF THE APP
#================================================= #=================================================
new_ynh_backup "$final_path" ynh_backup "$final_path" "${backup_dir}$final_path"
#================================================= #=================================================
# BACKUP OF THE NGINX CONFIGURATION # BACKUP OF THE NGINX CONFIGURATION
#================================================= #=================================================
new_ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf" ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf" "${backup_dir}/etc/nginx/conf.d/$domain.d/$app.conf"
#================================================= #=================================================
# BACKUP OF THE PHP-FPM CONFIGURATION # BACKUP OF THE PHP-FPM CONFIGURATION
#================================================= #=================================================
new_ynh_backup "/etc/php5/fpm/pool.d/$app.conf" ynh_backup "/etc/php5/fpm/pool.d/$app.conf" "${backup_dir}/etc/php5/fpm/pool.d/$app.conf"
new_ynh_backup "/etc/php5/fpm/conf.d/20-$app.ini" ynh_backup "/etc/php5/fpm/conf.d/20-$app.ini" "${backup_dir}/etc/php5/fpm/conf.d/20-$app.ini"
#================================================= #=================================================
# BACKUP OF THE SQL BDD # BACKUP OF THE SQL BDD
#================================================= #=================================================
ynh_mysql_dump_db "$db_name" > db.sql ynh_mysql_dump_db "$db_name" > db.sql
new_ynh_backup "db.sql" ynh_backup "db.sql" "${backup_dir}/db.sql"
#================================================= #=================================================
# SPECIFIC BACKUP # SPECIFIC BACKUP
@ -66,16 +66,16 @@ new_ynh_backup "db.sql"
# BACKUP LOGROTATE # BACKUP LOGROTATE
#================================================= #=================================================
new_ynh_backup "/etc/logrotate.d/$app" ynh_backup "/etc/logrotate.d/$app" "${backup_dir}/etc/logrotate.d/$app"
#================================================= #=================================================
# BACKUP SYSTEMD # BACKUP SYSTEMD
#================================================= #=================================================
new_ynh_backup "/etc/systemd/system/$app.service" ynh_backup "/etc/systemd/system/$app.service" "${backup_dir}/etc/systemd/system/$app.service"
#================================================= #=================================================
# BACKUP OF THE CRON FILE # BACKUP OF THE CRON FILE
#================================================= #=================================================
new_ynh_backup "/etc/cron.d/$app" ynh_backup "/etc/cron.d/$app" "${backup_dir}/etc/cron.d/$app"