2019-02-23 11:06:32 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# GENERIC START
|
|
|
|
#=================================================
|
|
|
|
# IMPORT GENERIC HELPERS
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
source ../settings/scripts/_common.sh
|
|
|
|
source /usr/share/yunohost/helpers
|
|
|
|
|
|
|
|
#=================================================
|
2020-05-30 19:18:05 +02:00
|
|
|
# DECLARE DATA AND CONF FILES TO BACKUP
|
2019-02-23 11:06:32 +01:00
|
|
|
#=================================================
|
2020-05-30 19:18:05 +02:00
|
|
|
ynh_print_info --message="Declaring files to be backed up..."
|
2019-02-23 11:06:32 +01:00
|
|
|
|
|
|
|
#=================================================
|
2020-05-30 19:18:05 +02:00
|
|
|
# BACKUP THE APP MAIN DIR
|
2019-02-23 11:06:32 +01:00
|
|
|
#=================================================
|
|
|
|
|
2023-03-14 16:44:09 +01:00
|
|
|
ynh_backup --src_path="$install_dir"
|
2019-02-23 11:06:32 +01:00
|
|
|
|
|
|
|
#=================================================
|
2023-03-14 16:44:09 +01:00
|
|
|
# BACKUP DATA_DIR
|
2019-02-23 11:06:32 +01:00
|
|
|
#=================================================
|
|
|
|
|
2023-03-14 16:44:09 +01:00
|
|
|
ynh_backup --src_path="$data_dir" --is_big
|
2019-02-23 11:06:32 +01:00
|
|
|
|
|
|
|
#=================================================
|
2021-11-23 08:28:18 +01:00
|
|
|
# BACKUP THE NGINX CONFIGURATION
|
2019-02-23 11:06:32 +01:00
|
|
|
#=================================================
|
|
|
|
|
2021-11-23 08:28:18 +01:00
|
|
|
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
2019-02-23 11:06:32 +01:00
|
|
|
|
2021-11-23 08:28:18 +01:00
|
|
|
ynh_backup --src_path="/etc/systemd/system/$app.service"
|
2019-10-25 11:04:41 +02:00
|
|
|
|
2019-02-23 11:06:32 +01:00
|
|
|
#=================================================
|
|
|
|
# END OF SCRIPT
|
|
|
|
#=================================================
|
|
|
|
|
2020-05-27 17:03:30 +02:00
|
|
|
ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)."
|