mirror of
https://github.com/YunoHost-Apps/restic_ynh.git
synced 2024-09-03 20:16:22 +02:00
36 lines
1.5 KiB
Bash
Executable file
36 lines
1.5 KiB
Bash
Executable file
#!/bin/bash
|
|
|
|
#=================================================
|
|
# GENERIC START
|
|
#=================================================
|
|
# IMPORT GENERIC HELPERS
|
|
#=================================================
|
|
|
|
# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts
|
|
source ../settings/scripts/_common.sh
|
|
source /usr/share/yunohost/helpers
|
|
|
|
#=================================================
|
|
# BACKUP VARIOUS FILES
|
|
#=================================================
|
|
|
|
ynh_backup --src_path="/usr/local/bin/backup-with-$app"
|
|
ynh_backup --src_path="/etc/systemd/system/$app.service"
|
|
ynh_backup --src_path="/etc/systemd/system/$app.timer"
|
|
ynh_backup --src_path="/etc/systemd/system/${app}_check.service"
|
|
ynh_backup --src_path="/etc/systemd/system/${app}_check.timer"
|
|
ynh_backup --src_path="/etc/systemd/system/${app}_check_read_data.service"
|
|
ynh_backup --src_path="/etc/systemd/system/${app}_check_read_data.timer"
|
|
ynh_backup --src_path="/etc/yunohost/hooks.d/backup_method/05-${app}_app"
|
|
ynh_backup --src_path="${install_dir}/check_method_${app}"
|
|
ynh_backup --src_path="${install_dir}/restic_log_${app}"
|
|
ssh_dir="/root/.ssh"
|
|
ynh_backup --src_path="${ssh_dir}/id_${app}_ed25519"
|
|
ynh_backup --src_path="${ssh_dir}/id_${app}_ed25519.pub"
|
|
ynh_backup --src_path="${ssh_dir}/config"
|
|
|
|
#=================================================
|
|
# END OF SCRIPT
|
|
#=================================================
|
|
|
|
ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)."
|