2016-05-07 18:21:06 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
2017-05-01 15:47:20 +02:00
|
|
|
#=================================================
|
2022-03-06 19:01:21 +01:00
|
|
|
# GENERIC START
|
2017-05-01 15:47:20 +02:00
|
|
|
#=================================================
|
|
|
|
# IMPORT GENERIC HELPERS
|
|
|
|
#=================================================
|
2016-05-07 18:21:06 +02:00
|
|
|
|
2022-03-06 19:01:21 +01:00
|
|
|
# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts
|
|
|
|
source ../settings/scripts/_common.sh
|
2017-05-01 15:47:20 +02:00
|
|
|
source /usr/share/yunohost/helpers
|
2016-05-07 18:21:06 +02:00
|
|
|
|
2018-05-28 00:30:42 +02:00
|
|
|
#=================================================
|
2020-09-19 16:09:37 +02:00
|
|
|
# DECLARE DATA AND CONF FILES TO BACKUP
|
|
|
|
#=================================================
|
|
|
|
ynh_print_info --message="Declaring files to be backed up..."
|
|
|
|
|
2017-05-01 15:47:20 +02:00
|
|
|
#=================================================
|
2022-03-06 19:01:21 +01:00
|
|
|
# BACKUP THE APP MAIN DIR
|
2017-05-01 15:47:20 +02:00
|
|
|
#=================================================
|
|
|
|
|
2023-08-18 11:38:35 +02:00
|
|
|
ynh_backup --src_path="$install_dir"
|
2017-05-01 15:47:20 +02:00
|
|
|
|
|
|
|
#=================================================
|
2022-03-06 19:01:21 +01:00
|
|
|
# BACKUP THE NGINX CONFIGURATION
|
2017-05-01 15:47:20 +02:00
|
|
|
#=================================================
|
|
|
|
|
2019-05-18 20:15:36 +02:00
|
|
|
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
2017-05-01 15:47:20 +02:00
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# SPECIFIC BACKUP
|
|
|
|
#=================================================
|
2022-03-06 19:01:21 +01:00
|
|
|
# BACKUP VARIOUS FILES
|
2017-05-01 15:47:20 +02:00
|
|
|
#=================================================
|
|
|
|
|
2022-03-06 19:01:21 +01:00
|
|
|
ynh_backup --src_path="/etc/uwsgi/apps-available/$app.ini"
|
2019-03-03 20:33:02 +01:00
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# END OF SCRIPT
|
|
|
|
#=================================================
|
|
|
|
|
2022-03-06 19:01:21 +01:00
|
|
|
ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)."
|