From tony.travis at abdn.ac.uk Mon Jan 20 08:02:38 2014 From: tony.travis at abdn.ac.uk (Tony Travis) Date: Mon, 20 Jan 2014 13:02:38 +0000 Subject: [Bio-linux-dev] bio-linux-backups Message-ID: <52DD1E6E.3020205@abdn.ac.uk> Hi, Tim. I came across a bug in bio-linux-backups if you change the default backup destination: /backups I want to do two backups to: /backup1 /backup2 However, the /etc/cron.daily/backup script has the literal string "/backups" in it, which I've replaced with the $backup_destination variable instead: > diff -Naur backup backup.orig > --- backup 2014-01-20 12:56:34.561789259 +0000 > +++ backup.orig 2010-10-05 13:49:43.000000000 +0100 > @@ -108,7 +108,7 @@ > > # if backup drive is already mounted then try to unmount it first. > # if this is in use the step will fail and exit > -/bin/mount | grep -q "$backup_destination" && /bin/umount "$backup_destination" 2>/dev/null > +/bin/mount | grep -q "/backups" && /bin/umount /backups 2>/dev/null > > # mount necessary drive - must be listed > # in /etc/fstab in order to be mounted I run two backups, using a minor modification and custom config files: > diff -Naur backup backup1 > --- backup 2014-01-20 12:56:34.561789259 +0000 > +++ backup1 2014-01-20 12:08:48.222583966 +0000 > @@ -18,7 +18,7 @@ > ####################################################################### > > # Source configuration file > -CONFIG=/etc/default/backup > +CONFIG=/etc/default/backup1 > if [ -r $CONFIG ]; then > . $CONFIG > fi > diff -Naur backup backup2 > --- backup 2014-01-20 12:56:34.561789259 +0000 > +++ backup2 2014-01-20 12:09:07.657796498 +0000 > @@ -18,7 +18,7 @@ > ####################################################################### > > # Source configuration file > -CONFIG=/etc/default/backup > +CONFIG=/etc/default/backup2 > if [ -r $CONFIG ]; then > . $CONFIG > fi HTH, Tony. -- Dr. A.J.Travis, University of Aberdeen, Institute of Biological and Environmental Sciences, Cruickshank Building, St. Machar Drive, Aberdeen AB24 3UU, Scotland, UK. tel +44(0)1224 272700, fax +44 (0)1224 272 396 http://www.abdn.ac.uk, mailto:tony.travis at abdn.ac.uk, skype:ajtravis The University of Aberdeen is a charity registered in Scotland, No SC013683. From tbooth at ceh.ac.uk Mon Jan 20 08:47:36 2014 From: tbooth at ceh.ac.uk (Tim Booth) Date: Mon, 20 Jan 2014 13:47:36 +0000 Subject: [Bio-linux-dev] bio-linux-backups In-Reply-To: <52DD1E6E.3020205@abdn.ac.uk> References: <52DD1E6E.3020205@abdn.ac.uk> Message-ID: <1390225656.2688.153.camel@balisaur> Hi Tony, Indeed - once you point it out it's hard to see how I ever missed it. I've updated the package, also adding the -w flag to grep while I'm at it, so if for some reason you want to mount /media/backup, /back, /backup and /backup2 all at once the script will not get confused. Cheers, TIM On Mon, 2014-01-20 at 13:02 +0000, Tony Travis wrote: > Hi, Tim. > > I came across a bug in bio-linux-backups if you change the default > backup destination: > > /backups > > I want to do two backups to: > > /backup1 > /backup2 > > However, the /etc/cron.daily/backup script has the literal string > "/backups" in it, which I've replaced with the $backup_destination > variable instead: > > > diff -Naur backup backup.orig > > --- backup 2014-01-20 12:56:34.561789259 +0000 > > +++ backup.orig 2010-10-05 13:49:43.000000000 +0100 > > @@ -108,7 +108,7 @@ > > > > # if backup drive is already mounted then try to unmount it first. > > # if this is in use the step will fail and exit > > -/bin/mount | grep -q "$backup_destination" && /bin/umount "$backup_destination" 2>/dev/null > > +/bin/mount | grep -q "/backups" && /bin/umount /backups 2>/dev/null > > > > # mount necessary drive - must be listed > > # in /etc/fstab in order to be mounted > > I run two backups, using a minor modification and custom config files: > > > diff -Naur backup backup1 > > --- backup 2014-01-20 12:56:34.561789259 +0000 > > +++ backup1 2014-01-20 12:08:48.222583966 +0000 > > @@ -18,7 +18,7 @@ > > ####################################################################### > > > > # Source configuration file > > -CONFIG=/etc/default/backup > > +CONFIG=/etc/default/backup1 > > if [ -r $CONFIG ]; then > > . $CONFIG > > fi > > > diff -Naur backup backup2 > > --- backup 2014-01-20 12:56:34.561789259 +0000 > > +++ backup2 2014-01-20 12:09:07.657796498 +0000 > > @@ -18,7 +18,7 @@ > > ####################################################################### > > > > # Source configuration file > > -CONFIG=/etc/default/backup > > +CONFIG=/etc/default/backup2 > > if [ -r $CONFIG ]; then > > . $CONFIG > > fi > > HTH, > > Tony. > > -- > Dr. A.J.Travis, University of Aberdeen, Institute of Biological and > Environmental Sciences, Cruickshank Building, St. Machar Drive, Aberdeen > AB24 3UU, Scotland, UK. tel +44(0)1224 272700, fax +44 (0)1224 272 396 > http://www.abdn.ac.uk, mailto:tony.travis at abdn.ac.uk, skype:ajtravis > The University of Aberdeen is a charity registered in Scotland, No SC013683. > _______________________________________________ > Bio-Linux-dev mailing list > Bio-Linux-dev at nebclists.nerc.ac.uk > http://nebclists.nerc.ac.uk/mailman/listinfo/bio-linux-dev -- Tim Booth NERC Environmental Bioinformatics Centre Centre for Ecology and Hydrology Maclean Bldg, Benson Lane Crowmarsh Gifford Wallingford, England OX10 8BB http://nebc.nerc.ac.uk +44 1491 69 2705