From 1e38980d0e2489c8071c2330ecc8b78b9edcc1c9 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Thu, 21 Jan 2016 10:50:17 -0300 Subject: [PATCH] Bug 14532: (followup) Use tar's --exclude for simplicity This patch creates an --exclude definition for the tar command so it is easier to stack excluded stuff. It does so for the authority and biblio indexes if --exclude-indexes is passed. A side effect from this, is that uploads and plugins are still backed up, as Jonathan noted. Regards --- debian/scripts/koha-dump | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/debian/scripts/koha-dump b/debian/scripts/koha-dump index a67a2c8..872f513 100755 --- a/debian/scripts/koha-dump +++ b/debian/scripts/koha-dump @@ -81,16 +81,17 @@ dump_instance() metadump="$backupdir/$name-$date.tar.gz" [ "$quiet" = "no" ] && echo "* configs, logs to $metadump" - zebra_files="" + excludes="" if [ "$exclude_indexes" = "no" ]; then - zebra_files="var/lib/koha/$name" + excludes="--exclude='var/lib/koha/$name/biblios' \ + --exclude='var/lib/koha/$name/authorities'" fi - tar -C / -czf "$metadump" \ + tar -C / -czf "$metadump" $excludes \ "etc/koha/sites/$name" \ "etc/apache2/sites-available/$instancefile" \ "etc/apache2/sites-enabled/$instancefile" \ - "var/log/koha/$name" ${zebra_files:+"$zebra_files"} + "var/log/koha/$name" [ "$quiet" = "no" ] && echo "Done." } -- 2.7.0