1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/zusam_ynh.git synced 2024-09-03 18:05:54 +02:00
zusam_ynh/scripts/backup

62 lines
1.9 KiB
Text
Raw Normal View History

2023-08-06 18:49:51 +02:00
#!/bin/bash
#=================================================
# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source ../settings/scripts/_common.sh
source /usr/share/yunohost/helpers
#=================================================
# DECLARE DATA AND CONF FILES TO BACKUP
#=================================================
2023-08-09 17:45:05 +02:00
ynh_print_info --message="Declaring files to be backed up..."
2023-08-06 18:49:51 +02:00
#=================================================
# BACKUP THE APP MAIN DIR
#=================================================
ynh_backup --src_path="$install_dir"
#=================================================
# BACKUP THE NGINX CONFIGURATION
#=================================================
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# BACKUP THE PHP-FPM CONFIGURATION
#=================================================
ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
#=================================================
# BACKUP FAIL2BAN CONFIGURATION
#=================================================
2023-08-09 17:45:05 +02:00
# ynh_backup --src_path="/etc/fail2ban/jail.d/$app.conf"
# ynh_backup --src_path="/etc/fail2ban/filter.d/$app.conf"
2023-08-06 18:49:51 +02:00
#=================================================
# SPECIFIC BACKUP
#=================================================
# BACKUP LOGROTATE
#=================================================
2023-08-09 17:45:05 +02:00
# ynh_backup --src_path="/etc/logrotate.d/$app"
2023-08-06 18:49:51 +02:00
#=================================================
# BACKUP VARIOUS FILES
#=================================================
ynh_backup --src_path="/etc/cron.d/$app"
#=================================================
# END OF SCRIPT
#=================================================
ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)."