Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • December 07, 2016, 09:55:38 PM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: *NIX: Commands / software to verify partition backups / clones?  (Read 2352 times)

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,845
    • View Profile
    • Donate to Member
*NIX: Commands / software to verify partition backups / clones?
« on: January 16, 2015, 10:47:45 PM »
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:

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

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 :)
« Last Edit: January 17, 2015, 01:51:34 AM by ewemoa »

Edvard

  • Coding Snacks Author
  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 2,888
    • View Profile
    • Donate to Member
Re: *NIX: Commands / software to verify partition backups / clones?
« Reply #1 on: January 17, 2015, 02:52:04 PM »
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.co.../state-zfs-on-linux/

40hz

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 11,768
    • View Profile
    • Donate to Member
Re: *NIX: Commands / software to verify partition backups / clones?
« Reply #2 on: January 17, 2015, 02:58:16 PM »
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

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,845
    • View Profile
    • Donate to Member
Re: *NIX: Commands / software to verify partition backups / clones?
« Reply #3 on: January 17, 2015, 05:09:36 PM »
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

  • Coding Snacks Author
  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 2,888
    • View Profile
    • Donate to Member
Re: *NIX: Commands / software to verify partition backups / clones?
« Reply #4 on: January 18, 2015, 08:35:35 PM »
Ah, hadn't realized you were using an all-hardware solution.  In that case, checksums should do just fine.

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,845
    • View Profile
    • Donate to Member
Re: *NIX: Commands / software to verify partition backups / clones?
« Reply #5 on: January 18, 2015, 10:33:52 PM »
Thanks :)