ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Main Area and Open Discussion > Non-Windows Software

*NIX: Commands / software to verify partition backups / clones?

(1/2) > >>

ewemoa:
Am trying out a cloning dock -- one of those things that let's one clone a drive to another without the use of a PC.

Would like to verify the results though -- perhaps not every time.

I'm currently doing something like:

md5sum /dev/sda1
...
md5sum /dev/sdaN

--- End quote ---

for N partitions and comparing with analogous results from the other drive.

I'm not that concerned about MBR / GPT metadata at the moment.  (Thought of just doing the whole drive (e.g. /dev/sda) but then realized that drive sizes differ some times :))

Also tried the cksum command as perhaps that's good enough to detect errors.  I/O is probably so much more of a bottleneck that may be there won't be a detectable difference...

Any favorites or recommendations for this sort of procedure?


Some numbers and additional details:

Cloning a c. 320 GB drive has taken around 80 min (have done this a couple of times now).

Verifying (i.e. using the md5sum program above on 4 partitions) I didn't track very closely, but it may have exceeded an hour total.

Three of the partitions contained ext4 filesystems and the fourth was swap -- yes, working with the swap partition was probably pointless :)

Edvard:
What tool are you using to do the backup?  Good ol' Rsync? Cp?  

In the case of Rsync, use the --log-file option to keep a log of all transfers and then grep the log for incompletes.

--- ---rsync --log-file=$HOME/rsync.log [file syncing bits here]  
In the case of cp, you could use crccp (part of the crcsum tools) from  here:
https://sourceforge.net/projects/crcsum/
which will do CRC hash checks on all copy operations.

... or use ZFS  :-[
https://clusterhq.com/blog/state-zfs-on-linux/

40hz:
IMO it's just easier to use Clonezilla. Get an inexpensive dual-drive dock, plug it in and have at it. I've never encountered a data corruption issue doing it that way either for Windows or Linux.

ewemoa:
Thanks for the replies.

My recent tool of choice has been Clonezilla for some time but that ties up a machine (and the process of setting up the backup is not a process I enjoy physically as well as ncursesly) so I'm experimenting with a dock that doesn't require a PC.

The dock is a dual drive dock -- one nice feature is that it's clear which slot is the source and which is the target.  There is a progress indicator so one can get a rough sense of how much to wait.

After looking around some more I see that there are docks that can perform verification of some sort, but have not found one in a price range that seems acceptable -- plus I just got one...

May be it'll be worth writing a small verification script...attaching the dock to a PC after finishing the clone and running a comparison in the background seems better than doing the backup via a dock / PC combination but perhaps that's not actually a very useful illusion :)

Edvard:
Ah, hadn't realized you were using an all-hardware solution.  In that case, checksums should do just fine.

Navigation

[0] Message Index

[#] Next page

Go to full version