Koozali.org: home of the SME Server

Obsolete Releases => SME Server 8.x => Topic started by: kruhm on September 27, 2014, 09:55:50 PM

Title: Backup to USB DRIVE Multiple Disk Routine
Post by: kruhm on September 27, 2014, 09:55:50 PM
Hi,

I backup a server with the builtin backup service to workstation to a USB CADDY hard drive (/dev/sdc mounted at /media/BackupDrive1). It's working fine.

I want to replace the hard drive with another to provide a snapshot archive.

When I shutdown the USB CADDY, I unplug the hard drive and plug in another hard drive. I start the USB CADDY again and the hard drive is recognized as /dev/sdd.

When I start the backup job manually via:
Code: [Select]
/sbin/e-smith/do_backupwk
I get:
Quote
Error while mounting /dev/sdc1 /media/BackupDrive1 :
mount: special device /dev/sdc1 does not exist
Backup terminated: backup failed - status: 7424

So my question is how do I correctly rotate usb hard drives and get the same backup to work?

Thanks,
Title: Re: Backup to USB DRIVE Multiple Disk Routine
Post by: janet on September 28, 2014, 12:23:33 AM
kruhm

Is the label name on each backup disk the same or different ?
Title: Re: Backup to USB DRIVE Multiple Disk Routine
Post by: kruhm on September 28, 2014, 12:52:41 PM
The labels are different.

Code: [Select]
# e2label /dev/sdd1
BackupDrive2
Title: Re: Backup to USB DRIVE Multiple Disk Routine
Post by: janet on September 28, 2014, 01:05:05 PM
kruhm

I suggest you make the disk labels the same.
Title: Re: Backup to USB DRIVE Multiple Disk Routine
Post by: kruhm on September 28, 2014, 10:57:45 PM
That didn't work.

Code: [Select]
# e2label /dev/sdd1
BackupDrive1

Code: [Select]
# /sbin/e-smith/do_backupwk
Error while mounting /dev/sdc1 /media/BackupDrive1 :
mount: special device /dev/sdc1 does not exist
Backup terminated: backup failed - status: 7424

If the labels didn't work, it looks like it uses the dev name.

Won't my options for a large, long-term backup be limited to either a NAS or limiting down the length of the backup that can fit on 1 dev.
Title: Re: Backup to USB DRIVE Multiple Disk Routine
Post by: janet on September 29, 2014, 01:45:43 AM
kruhm

I swap up to 4 portable USB drives, with only one connected at any time so each one gets the same USB port & is identified as sdc. They all have the same label name & it works fine.

Maybe the issue is with the caddie, is it a single disk or multiple disk caddie. The sme server is seeing the first port sdc as already in use & then allocating the next port sdd.
Assuming it's external then try unplugging the caddie USB cable from sme server before swapping drives, & reattach after inserting the new drive.

Also did you read the USB drive Howto where it talks about adding label IDs to fstab. Maybe you need to try that.

what is current contents of /etc/fstab
Title: Re: Backup to USB DRIVE Multiple Disk Routine
Post by: kruhm on September 29, 2014, 12:14:45 PM
Quote
I swap up to 4 portable USB drives, with only one connected at any time so each one gets the same USB port & is identified as sdc. They all have the same label name & it works fine.

Thanks for confirming this is possible.

Quote
Assuming it's external then try unplugging the caddie USB cable from sme server before swapping drives, & reattach after inserting the new drive.

That's a really good idea. I'll continue to try and let you know what I find.