diff --git a/doc/DISCLAIMER.md b/doc/ADMIN.md similarity index 100% rename from doc/DISCLAIMER.md rename to doc/ADMIN.md diff --git a/doc/DESCRIPTION.md b/doc/DESCRIPTION.md index afa199e..7528929 100644 --- a/doc/DESCRIPTION.md +++ b/doc/DESCRIPTION.md @@ -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)). diff --git a/scripts/backup b/scripts/backup index 7330219..f420f88 100755 --- a/scripts/backup +++ b/scripts/backup @@ -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