1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/borgserver_ynh.git synced 2024-09-03 20:36:20 +02:00

Merge pull request #21 from YunoHost-Apps/testing

[fix] Remove old Data home optimization
This commit is contained in:
ljf (zamentur) 2020-02-27 17:38:37 +01:00 committed by GitHub
commit 8d8c70abb5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 2 additions and 25 deletions

View file

@ -1,19 +0,0 @@
#!/bin/bash
# Exit hook on subcommand error or unset variable
set -eu
# Source YNH helpers
source /usr/share/yunohost/helpers
# Backup destination
backup_dir="${1}/data/home"
# Backup user home
for f in $(find /home/* -type d -prune | awk -F/ '{print $NF}'); do
if [[ ! "$f" =~ ^yunohost|lost\+found ]]; then
if [ ! -e "/home/$f/.nobackup" ]; then
ynh_backup "/home/$f" "${backup_dir}/$f" 1
fi
fi
done

View file

@ -6,7 +6,7 @@
"en": "Offer backup storage to a friend.", "en": "Offer backup storage to a friend.",
"fr": "Offrez un espace de stockage à un⋅e ami⋅e." "fr": "Offrez un espace de stockage à un⋅e ami⋅e."
}, },
"version": "1.1.10~ynh1", "version": "1.1.10~ynh2",
"url": "https://borgbackup.readthedocs.io", "url": "https://borgbackup.readthedocs.io",
"license": "BSD-3-Clause", "license": "BSD-3-Clause",
"maintainer": { "maintainer": {

View file

@ -20,5 +20,3 @@ ynh_abort_if_errors
#================================================= #=================================================
app=$YNH_APP_INSTANCE_NAME app=$YNH_APP_INSTANCE_NAME
ynh_backup "/etc/yunohost/hooks.d/backup/17-data_home"

View file

@ -56,6 +56,4 @@ echo "command=\"borg serve $extra --restrict-to-repository /home/$ssh_user/backu
# AVOID BACKUP OF BACKUP # AVOID BACKUP OF BACKUP
#================================================= #=================================================
touch $home/.nobackup touch $home/.nobackup
mkdir -p /etc/yunohost/hooks.d/backup
cp -f ../conf/17-data_home /etc/yunohost/hooks.d/backup/17-data_home

View file

@ -53,6 +53,5 @@ echo "command=\"borg serve $extra --restrict-to-repository /home/$ssh_user/backu
# AVOID BACKUP OF BACKUP # AVOID BACKUP OF BACKUP
#================================================= #=================================================
touch $home/.nobackup touch $home/.nobackup
mkdir -p /etc/yunohost/hooks.d/backup
ynh_restore ynh_restore

View file

@ -39,3 +39,4 @@ if is_stretch; then
install_borg_with_pip install_borg_with_pip
fi fi
rm -f /etc/yunohost/hooks.d/backup/17-data_home