2020-05-04 19:14:59 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# GENERIC START
|
|
|
|
#=================================================
|
|
|
|
# IMPORT GENERIC HELPERS
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
source ../settings/scripts/_common.sh
|
|
|
|
source /usr/share/yunohost/helpers
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# BACKUP THE APP MAIN DIR
|
|
|
|
#=================================================
|
|
|
|
|
2023-03-10 22:48:26 +01:00
|
|
|
ynh_backup --src_path="$install_dir"
|
2020-05-04 19:14:59 +02:00
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# BACKUP THE NGINX CONFIGURATION
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# BACKUP THE PHP-FPM CONFIGURATION
|
|
|
|
#=================================================
|
|
|
|
|
2021-01-26 18:59:02 +01:00
|
|
|
ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
2020-05-04 19:14:59 +02:00
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# SPECIFIC BACKUP
|
|
|
|
#=================================================
|
|
|
|
# BACKUP LOGROTATE
|
|
|
|
#=================================================
|
|
|
|
|
2023-03-10 22:48:26 +01:00
|
|
|
ynh_backup --src_path="/etc/logrotate.d/$app"
|
2020-05-04 19:14:59 +02:00
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# END OF SCRIPT
|
|
|
|
#=================================================
|
|
|
|
|
2021-02-14 12:38:49 +01:00
|
|
|
ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)."
|