From 796248311a3edceb7f31d2d9fa4238338de76936 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Garrigue?= Date: Fri, 21 Aug 2015 15:26:20 +0000 Subject: [PATCH] Improxing backup explanation --- README.md | 8 ++++---- scripts/backup | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 6a20f64..c5bc221 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ Here's the command which should be tested and included in a /etc/cron.daily/dotc yunohost backup create --hooks dotclear2 -There might be two bugs preventing this command to work. First one +There might be two bugs preventing this command to work. First one that you may fix asap. root@debian-jessie:~# yunohost backup create Traceback (most recent call last): @@ -31,11 +31,11 @@ There might be two bugs preventing this command to work. First one logging.info("unable to iterate over local archives: %s", str(e)) NameError: global name 'logging' is not defined -Here is the fix +The correction to be applied sed -i -e "302s/logging/logger/" /usr/lib/moulinette/yunohost/backup.py -Second one +The second bug, that may only be fixed after a first failed backup attempt as this will create the 50-dotclear2 file root@debian-jessie:~/dotclear2_ynh# yunohost backup create --hooks dotclear2 Exécution des scripts de sauvegarde... @@ -44,7 +44,7 @@ Second one Création de l'archive de sauvegarde... Succès ! Sauvegarde terminée -Here is the fix +Then you can fix it chown admin /etc/yunohost/hooks.d/backup/50-dotclear2 diff --git a/scripts/backup b/scripts/backup index 6249db0..5aeb435 100755 --- a/scripts/backup +++ b/scripts/backup @@ -7,6 +7,7 @@ app=dotclear2 # which will be compressed afterward backup_dir=$1/apps/$app sudo mkdir -p $backup_dir +sudo chown admin $backup_dir # Backup sources sudo cp -a /var/www/$app/. $backup_dir/sources