mirror of
https://github.com/YunoHost-Apps/restic_ynh.git
synced 2024-09-03 20:16:22 +02:00
cleaning
This commit is contained in:
parent
e70429a0ab
commit
3e1ba67590
3 changed files with 14 additions and 35 deletions
|
@ -1,5 +1,5 @@
|
|||
A [Restic](https://restic.net/) package for YunoHost (heavily inspired by [the Borg package](https://github.com/YunoHost-Apps/borg_ynh/)).
|
||||
|
||||
Restic is a backup tool that can make local and remote backups.
|
||||
This package uses restic to make backups to a sftp server.
|
||||
This package uses restic to make backups to a sFTP server.
|
||||
The package does not handle local backups yet but you can work around that by using the local sftp server as target server (see my comment [here](https://forum.yunohost.org/t/sauvegarde-yunohost-avec-restic/10275/33)).
|
||||
|
|
|
@ -10,45 +10,24 @@
|
|||
source ../settings/scripts/_common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
# MANAGE SCRIPT FAILURE
|
||||
#=================================================
|
||||
|
||||
# Exit if an error occurs during the execution of the script
|
||||
#REMOVEME? ynh_abort_if_errors
|
||||
|
||||
#=================================================
|
||||
# LOAD SETTINGS
|
||||
#=================================================
|
||||
#REMOVEME? ynh_print_info --message="Loading installation settings..."
|
||||
|
||||
#REMOVEME? export app=$YNH_APP_INSTANCE_NAME
|
||||
export install_dir="/opt/yunohost/${app}"
|
||||
|
||||
#=================================================
|
||||
# DECLARE DATA AND CONF FILES TO BACKUP
|
||||
#=================================================
|
||||
ynh_print_info --message="Declaring files to be backed up..."
|
||||
|
||||
|
||||
#=================================================
|
||||
# BACKUP VARIOUS FILES
|
||||
#=================================================
|
||||
|
||||
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/systemd/system/${app}_check.service"
|
||||
ynh_backup "/etc/systemd/system/${app}_check.timer"
|
||||
ynh_backup "/etc/systemd/system/${app}_check_read_data.service"
|
||||
ynh_backup "/etc/systemd/system/${app}_check_read_data.timer"
|
||||
ynh_backup "/etc/yunohost/hooks.d/backup_method/05-${app}_app"
|
||||
ynh_backup "${install_dir}/check_method_${app}"
|
||||
ynh_backup "${install_dir}/restic_log_${app}"
|
||||
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 "${ssh_dir}/id_${app}_ed25519"
|
||||
ynh_backup "${ssh_dir}/id_${app}_ed25519.pub"
|
||||
ynh_backup "${ssh_dir}/config"
|
||||
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
|
||||
|
|
Loading…
Add table
Reference in a new issue