mirror of
https://github.com/YunoHost-Apps/flohmarkt_ynh.git
synced 2024-09-03 18:36:30 +02:00
28 lines
1.1 KiB
Bash
Executable file
28 lines
1.1 KiB
Bash
Executable file
#!/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"
|
|
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"
|
|
ynh_backup --src_path="/opt/couchdb/etc/local.d/05-flohmarkt.ini"
|
|
ynh_backup --src_path="/etc/systemd/system/$app.service"
|
|
|
|
# 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
|
|
|
|
ynh_backup --src_path="$data_dir" --is_big
|
|
ynh_backup --src_path="/var/lib/couchdb" --is_big
|
|
|
|
ynh_print_info --message="...done. Starting couchdb and flohmarkt."
|
|
systemctl start couchdb
|
|
yunohost service start flohmarkt
|
|
|
|
ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)."
|