2017-03-02 15:44:54 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
2018-09-03 23:31:52 +02:00
|
|
|
#=================================================
|
|
|
|
# GENERIC START
|
|
|
|
#=================================================
|
|
|
|
# IMPORT GENERIC HELPERS
|
|
|
|
#=================================================
|
2017-03-02 15:44:54 +01:00
|
|
|
|
2022-10-06 00:00:31 +02:00
|
|
|
# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts
|
2018-09-03 23:31:52 +02:00
|
|
|
source ../settings/scripts/_common.sh
|
2017-03-02 15:44:54 +01:00
|
|
|
source /usr/share/yunohost/helpers
|
|
|
|
|
2020-07-10 19:22:37 +02:00
|
|
|
#=================================================
|
|
|
|
# DECLARE DATA AND CONF FILES TO BACKUP
|
|
|
|
#=================================================
|
|
|
|
ynh_print_info --message="Declaring files to be backed up..."
|
|
|
|
|
2018-09-03 23:31:52 +02:00
|
|
|
#=================================================
|
|
|
|
# BACKUP THE APP MAIN DIR
|
|
|
|
#=================================================
|
|
|
|
|
2023-04-27 23:04:36 +02:00
|
|
|
ynh_backup --src_path="$install_dir"
|
2018-09-03 23:31:52 +02:00
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# BACKUP THE NGINX CONFIGURATION
|
|
|
|
#=================================================
|
|
|
|
|
2021-02-07 17:05:09 +01:00
|
|
|
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
2017-03-02 15:44:54 +01:00
|
|
|
|
2018-09-03 23:31:52 +02:00
|
|
|
#=================================================
|
|
|
|
# BACKUP THE PHP-FPM CONFIGURATION
|
|
|
|
#=================================================
|
2019-10-26 15:25:19 +02:00
|
|
|
|
2022-10-06 00:00:31 +02:00
|
|
|
ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
2021-02-07 17:05:09 +01:00
|
|
|
|
|
|
|
#=================================================
|
2022-10-06 00:00:31 +02:00
|
|
|
# SPECIFIC BACKUP
|
|
|
|
#=================================================
|
|
|
|
# BACKUP VARIOUS FILES
|
2021-02-07 17:05:09 +01:00
|
|
|
#=================================================
|
|
|
|
|
|
|
|
ynh_backup --src_path="/etc/cron.d/$app"
|
2019-10-26 15:25:19 +02:00
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# END OF SCRIPT
|
|
|
|
#=================================================
|
|
|
|
|
2020-07-10 19:22:37 +02:00
|
|
|
ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)."
|