1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/kiwiirc_ynh.git synced 2024-09-03 19:35:59 +02:00
kiwiirc_ynh/scripts/backup

47 lines
1.4 KiB
Text
Raw Permalink Normal View History

2020-10-11 15:21:19 +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
#=================================================
ynh_print_info --message="Declaring files to be backed up..."
2024-02-05 15:30:16 +01:00
#=================================================
# BACKUP THE APP MAIN DIR
#=================================================
ynh_backup --src_path="$install_dir"
2020-10-11 15:21:19 +02:00
#=================================================
# BACKUP THE NGINX CONFIGURATION
#=================================================
2024-02-05 15:30:16 +01:00
# Backup the nginx configuration
2020-10-11 15:21:19 +02:00
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
2024-02-05 15:30:16 +01:00
# Backup the systemd service unit
ynh_backup --src_path="/etc/systemd/system/$app.service"
2024-02-05 15:39:09 +01:00
# Backup the logrotate configuration
ynh_backup --src_path="/etc/logrotate.d/$app"
2022-02-04 09:04:28 +01:00
#=================================================
2024-02-05 15:30:16 +01:00
# BACKUP VARIOUS FILES
2022-02-04 09:04:28 +01:00
#=================================================
2024-02-05 15:39:09 +01:00
ynh_backup --src_path="/var/log/$app"
2022-02-04 09:49:47 +01:00
2020-10-11 15:21:19 +02:00
#=================================================
# END OF SCRIPT
#=================================================
2021-09-24 07:43:11 +02:00
ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)."