2024-02-21 16:50:15 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
source ../settings/scripts/_common.sh
|
|
|
|
source /usr/share/yunohost/helpers
|
|
|
|
|
|
|
|
ynh_print_info --message="Declaring files to be backed up..."
|
|
|
|
ynh_backup --src_path="$install_dir"
|
|
|
|
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
2024-04-20 15:53:19 +02:00
|
|
|
# ynh_backup --src_path="/etc/fail2ban/jail.d/$app.conf"
|
|
|
|
# ynh_backup --src_path="/etc/fail2ban/filter.d/$app.conf"
|
|
|
|
ynh_backup --src_path="/etc/logrotate.d/$app"
|
2024-04-21 12:43:18 +02:00
|
|
|
ynh_backup --src_path="/opt/couchdb/etc/local.d/05-flohmarkt.ini"
|
2024-02-21 16:50:15 +01:00
|
|
|
|
2024-04-20 15:53:19 +02:00
|
|
|
# for the following backups we'll want to stop flohmarkt and couchdb
|
|
|
|
# to guarentee a consistant state
|
|
|
|
ynh_print_info --message="Stopping flohmarkt and couchdb to backup data..."
|
|
|
|
yunohost service stop flohmarkt
|
|
|
|
systemctl stop couchdb
|
2024-02-21 16:50:15 +01:00
|
|
|
|
2024-04-20 15:53:19 +02:00
|
|
|
ynh_backup --src_path="$data_dir" --is_big
|
|
|
|
ynh_backup --src_path="/var/lib/couchdb" --is_big
|
2024-02-21 16:50:15 +01:00
|
|
|
|
2024-04-20 15:53:19 +02:00
|
|
|
ynh_print_info --message="...done. Starting couchdb and flohmarkt."
|
|
|
|
systemctl start couchdb
|
|
|
|
yunohost service start flohmarkt
|
2024-02-21 16:50:15 +01:00
|
|
|
|
|
|
|
ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)."
|