mirror of
https://github.com/YunoHost-Apps/restic_ynh.git
synced 2024-09-03 20:16:22 +02:00
8d57e11cd1
This is an adaptation of https://github.com/YunoHost-Apps/borg_ynh/blob/master/conf/backup-with-borg.j2
30 lines
887 B
Bash
Executable file
30 lines
887 B
Bash
Executable file
#!/bin/bash
|
|
|
|
#=================================================
|
|
# GENERIC START
|
|
#=================================================
|
|
# IMPORT GENERIC HELPERS
|
|
#=================================================
|
|
|
|
source /usr/share/yunohost/helpers
|
|
|
|
#=================================================
|
|
# MANAGE SCRIPT FAILURE
|
|
#=================================================
|
|
|
|
# Exit if an error occurs during the execution of the script
|
|
ynh_abort_if_errors
|
|
|
|
#=================================================
|
|
# LOAD SETTINGS
|
|
#=================================================
|
|
|
|
app=$YNH_APP_INSTANCE_NAME
|
|
|
|
|
|
ynh_backup "/usr/local/bin/backup-with-$app"
|
|
ynh_backup "/etc/systemd/system/$app.service"
|
|
ynh_backup "/etc/systemd/system/$app.timer"
|
|
ynh_backup "/etc/yunohost/hooks.d/backup_method/05-${app}_app"
|
|
ynh_backup "/root/.ssh/id_${app}_ed25519"
|
|
ynh_backup "/root/.ssh/id_${app}_ed25519.pub"
|