1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/yunomonitor_ynh.git synced 2024-09-03 17:46:11 +02:00
yunomonitor_ynh/scripts/backup

49 lines
1.6 KiB
Text
Raw Normal View History

#!/bin/bash
#=================================================
# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
2022-01-27 02:21:23 +01:00
# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts
source ../settings/scripts/_common.sh
source /usr/share/yunohost/helpers
#=================================================
2021-08-16 09:20:33 +02:00
# DECLARE DATA AND CONF FILES TO BACKUP
#=================================================
2021-08-16 09:20:33 +02:00
ynh_print_info --message="Declaring files to be backed up..."
#=================================================
# BACKUP THE APP MAIN DIR
#=================================================
2023-12-11 12:37:28 +01:00
ynh_backup --src_path="$install_dir"
#=================================================
# BACKUP THE NGINX CONFIGURATION
#=================================================
2019-11-19 20:51:09 +01:00
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/000-$app.conf"
#=================================================
# SPECIFIC BACKUP
#=================================================
# BACKUP SYSTEMD
#=================================================
ynh_backup --src_path="/etc/systemd/system/$app.service"
#=================================================
2022-01-27 02:21:23 +01:00
# BACKUP VARIOUS FILES
#=================================================
ynh_backup --src_path="/etc/systemd/system/$app.timer"
#=================================================
# END OF SCRIPT
#=================================================
2021-08-16 09:20:33 +02:00
ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)."