mirror of
https://github.com/YunoHost-Apps/borg_ynh.git
synced 2024-09-03 18:16:05 +02:00
32 lines
1.1 KiB
Bash
Executable file
32 lines
1.1 KiB
Bash
Executable file
#!/bin/bash
|
|
|
|
#=================================================
|
|
# GENERIC START
|
|
#=================================================
|
|
# IMPORT GENERIC HELPERS
|
|
#=================================================
|
|
|
|
source /usr/share/yunohost/helpers
|
|
|
|
#=================================================
|
|
# DECLARE DATA AND CONF FILES TO BACKUP
|
|
#=================================================
|
|
ynh_print_info --message="Declaring files to be backed up..."
|
|
|
|
ynh_backup --src_path="/etc/systemd/system/$app.service"
|
|
ynh_backup --src_path="/etc/systemd/system/$app.timer"
|
|
|
|
ynh_backup --src_path="/etc/yunohost/hooks.d/backup_method/05-${app}_app"
|
|
ynh_backup --src_path="/etc/sudoers.d/$app"
|
|
|
|
ynh_backup --src_path="/root/.ssh/id_${app}_ed25519" --not_mandatory
|
|
ynh_backup --src_path="/root/.ssh/id_${app}_ed25519.pub" --not_mandatory
|
|
|
|
ynh_backup --src_path="$install_dir/backup-with-borg"
|
|
ynh_backup --src_path="$install_dir/logging.conf"
|
|
|
|
#=================================================
|
|
# END OF SCRIPT
|
|
#=================================================
|
|
|
|
ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)."
|