1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/freshrss_ynh.git synced 2024-09-03 18:36:33 +02:00
freshrss_ynh/scripts/backup

28 lines
712 B
Text
Raw Normal View History

2016-02-09 00:48:21 +01:00
#!/bin/bash
2017-02-14 09:40:18 +01:00
# Source app helpers
. /usr/share/yunohost/helpers
2018-10-21 17:55:39 +02:00
#=================================================
# MANAGE SCRIPT FAILURE
#=================================================
# Exit if an error occurs during the execution of the script
ynh_abort_if_errors
2016-02-09 00:48:21 +01:00
# retrieve useful param
2017-03-12 19:27:31 +01:00
app=$YNH_APP_INSTANCE_NAME
2017-03-12 19:31:50 +01:00
path=/var/www/$app
2017-03-12 19:27:31 +01:00
dbpass=$(ynh_app_setting_get "$app" mysqlpwd)
domain=$(ynh_app_setting_get "$app" domain)
2016-02-09 00:48:21 +01:00
# Backup app files
2017-03-12 19:27:31 +01:00
ynh_backup "$path" "www"
2016-02-09 00:48:21 +01:00
# Backup conf files
2017-03-12 19:46:53 +01:00
ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf" "nginx.conf"
2017-12-03 15:16:37 +01:00
ynh_backup "/etc/cron.d/$app" "cron"
2018-07-07 15:43:31 +02:00
ynh_backup "/etc/php/7.0/fpm/pool.d/$app.conf" "php-fpm.conf"
2016-02-09 00:48:21 +01:00
# Backup mysql
2017-03-12 19:27:31 +01:00
ynh_mysql_dump_db $app > $app.dmp