[Bio-linux-dev] bio-linux-backups

Tony Travis tony.travis at abdn.ac.uk
Mon Jan 20 08:02:38 EST 2014


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.



More information about the Bio-linux-devel mailing list