Koozali.org: home of the SME Server

An easy way to rotate between usb-disks for backup?

Offline holck

  • ****
  • 317
  • +1/-0
An easy way to rotate between usb-disks for backup?
« on: January 09, 2016, 10:10:44 AM »
The server uses dar to make a backup to a usb-disk each night (http://wiki.contribs.org/Backup_with_dar). The usb-disk is permanently attached to the server, and the setup works fine. But it of course involves a risk: if something happens to the server room, both the server and the usb-disk may be damaged.

So I want to rotate between two or more usb-disks: leaving only one disk in the server room, and storing the other(s) in a different location. This is a little bit difficult, because the usb-disks use different file systems and have separate entries in /etc/fstab, so I must change the server setup each time I switch disks. It will be much more convenient if the server can automatically backup to the currently attached usb disk.

Any ideas?
......

Offline kb-ohnemus

  • ****
  • 154
  • +0/-0
    • http://www.kb-ohnemus.de
Re: An easy way to rotate between usb-disks for backup?
« Reply #1 on: January 09, 2016, 10:43:10 AM »
Why not use two identical disks ot least give them the same name and filesystem?
You can do this by:
mkfs.ext3 -L backup /dev/sdc1

where sdc1 is your usb drive and backup is the new Label.

The got to server manager, backup and restore, configure, local drive (sorry, german here so I can't tell you the exact terms...) and /media/backup will be your new destination, for all drives labeled "backup".

Offline Stefano

  • *
  • 10,839
  • +2/-0
Re: An easy way to rotate between usb-disks for backup?
« Reply #2 on: January 14, 2016, 10:53:31 AM »
well, my 2c

rotating usb disks is error prone for many reason
IMO you'd buy a little nas (2 disks) and use it for backup.. then, once a week or anytime you need, use a single usb disk to make offline copies (from the nas to the disk, so no involvement of SME)

you'll spend a bit more, but you'll have surely a more secure backup

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: An easy way to rotate between usb-disks for backup?
« Reply #3 on: January 14, 2016, 12:49:12 PM »
holck

My answer is in reference to using the built in server manager backup to workstation (to locally connected removeable USB disk):

Give both (or all) the removeable USB disks the same Label name (Backup1), & they should automatically mount at the same location when plugged in & the backup runs (ie let SME manage this automatically). Make sure to create the folder /media/Backup1
eg

/dev/sdc1 /media/Backup1

That works fine for backup.

Run a full backup on both (or all) USB disks, & then start using each disk for daily incremental backups.

The problem is with Restore, the backup file names are not ordered numerically & a restore will fail.

The workaround (if you need to do a restore) is to rename all the backup files on the USB disk to have sequential numerical numbering.
Then restore will work OK then.

To me this needs to be fixed (or catered for) in SME server.
I think someone else lodged a bug report a long time ago but nothing came of it.
To leave a backup disk sitting attached to a server for a whole week or a month is very dangerous, from a data security point of view.
It might be OK for a small home user, but simply not acceptable for even a small business.
Swapping backup disks to an offsite location on a daily basis is absolutely essential, in my opinion.

FYI, Affa will happily work the way you want. Just do a full backup to each USB disk & then do daily incrementals, ,swapping the connected USB backup disk each day. The same Label requirements as above are needed, so the backup is always to /dev/sdc1 /mount/Backup1

Refer to the USB Disk Howto
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.