wrong disk gets backed up
A partition and disk imaging/cloning program
Brought to you by:
steven_shiau
I am using clonezilla-live-20170905-zesty-amd64 to do a scripted backup. The command line I'm using for the backup is:
/usr/sbin/ocs-sr -batch -q2 -j2 -z1p -i 4096 -scs -p true savedisk autoname sdc
The problem is that occasionally, "sdc" is assigned to a different disk drive that I expected it to be, and it backs up the wrong disk.
Is there a way to force devices in the /dev directory to be consistent from session to session? I have a disk label on the ext2-formatted drive I want to backup, but I have not found a way to tell Clonezilla to use the label to assign it to "sdc". Or maybe there is another solution?
I would love to associate the device with a filesystem label. But how to tell Clonezilla about it? Can I replace "sdc" with "disk/by-label/BACKUP-VOLUME"? Or something like that?
You can't replace "sdc" with "disk/by-label/..." in the ocs-sr command's arguments. What script are you running when you execute clonezilla? Edit the relevant sections to do something like:
The by-label will catch only the volume (eg. sdc2), so if you want to backup the whole disk, do this:
Thank you, Michal Zatloukal, for this very insightful suggestion. You have obviously encountered this exact problem before and have identified a very good solution. I am happy that Steven Shiau is looking at the issue and may be able to create a more straighforward method for solving this problem in the future. But your suggest has helped me very much. Thank you.
--Saige
For the time being, there are two reserved words for the device name, i.e.,
"ask_user" and "all".
"ask_user" allows you to select the source disk name, wile "all" will automatically put the available disk name detected on the system as the source disks. In the future, if you have a good rule to select a device (like some kind of UUID which can be detected on the system then converted to device name), then we can implement that.
Thanks.
Steven
Thanks for looking at this, Steven,
I'm primarily a Linux user, so I don't know how well this would work for Windows users. But my thought would be to allow values in the device name field like the following:
I think my LABEL and UUID suggestions are practically a carbon copy of the LABEL and UUID options for the mount command on my Linux distribution.
For the record, the suggestion made by Michal Zatloukal above, seems to be working well for me at this point. But it is not immediately apparent to the un-trained eye that this possibility exists. So an option to directly support LABEL and UUID would be welcomed.
Thanks for your consideration,
--Saige
Saige,
Thanks for your suggestion. The key is actually that UUID and Label is for partition or file system, not for disk. Therefore we should have a way to implement that for disk device.
Steven