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
2018-10-21 22:50:45 +02:00

27 lines
712 B
Bash
Executable file

#!/bin/bash
# Source app helpers
. /usr/share/yunohost/helpers
#=================================================
# MANAGE SCRIPT FAILURE
#=================================================
# Exit if an error occurs during the execution of the script
ynh_abort_if_errors
# retrieve useful param
app=$YNH_APP_INSTANCE_NAME
path=/var/www/$app
dbpass=$(ynh_app_setting_get "$app" mysqlpwd)
domain=$(ynh_app_setting_get "$app" domain)
# Backup app files
ynh_backup "$path" "www"
# Backup conf files
ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf" "nginx.conf"
ynh_backup "/etc/cron.d/$app" "cron"
ynh_backup "/etc/php/7.0/fpm/pool.d/$app.conf" "php-fpm.conf"
# Backup mysql
ynh_mysql_dump_db $app > $app.dmp