mirror of
https://github.com/YunoHost-Apps/borgserver_ynh.git
synced 2024-09-03 20:36:20 +02:00
[fix] Remove old Data home optimization
This commit is contained in:
parent
d320017d1f
commit
7167f4455d
6 changed files with 2 additions and 25 deletions
|
@ -1,19 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Exit hook on subcommand error or unset variable
|
||||
set -eu
|
||||
|
||||
# Source YNH helpers
|
||||
source /usr/share/yunohost/helpers.d/filesystem
|
||||
|
||||
# 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
|
|
@ -6,7 +6,7 @@
|
|||
"en": "Offer backup storage to a friend.",
|
||||
"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",
|
||||
"license": "BSD-3-Clause",
|
||||
"maintainer": {
|
||||
|
|
|
@ -20,5 +20,3 @@ ynh_abort_if_errors
|
|||
#=================================================
|
||||
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
ynh_backup "/etc/yunohost/hooks.d/backup/17-data_home"
|
||||
|
|
|
@ -56,6 +56,4 @@ echo "command=\"borg serve $extra --restrict-to-repository /home/$ssh_user/backu
|
|||
# AVOID BACKUP OF BACKUP
|
||||
#=================================================
|
||||
touch $home/.nobackup
|
||||
mkdir -p /etc/yunohost/hooks.d/backup
|
||||
cp -f ../conf/17-data_home /etc/yunohost/hooks.d/backup/17-data_home
|
||||
|
||||
|
|
|
@ -53,6 +53,5 @@ echo "command=\"borg serve $extra --restrict-to-repository /home/$ssh_user/backu
|
|||
# AVOID BACKUP OF BACKUP
|
||||
#=================================================
|
||||
touch $home/.nobackup
|
||||
mkdir -p /etc/yunohost/hooks.d/backup
|
||||
ynh_restore
|
||||
|
||||
|
|
|
@ -39,3 +39,4 @@ if is_stretch; then
|
|||
|
||||
install_borg_with_pip
|
||||
fi
|
||||
rm -f /etc/yunohost/hooks.d/backup/17-data_home
|
||||
|
|
Loading…
Reference in a new issue