[Dirvish] Replacing backup drive

Nathan Hunsperger dirvish at hunsperger.com
Sat Jul 14 03:38:36 UTC 2018


On 7/13/18 5:55 PM, Jim Conger wrote:

> Use rsync with all the right options to copy pretty much every detail, 
> see man page for rsync, but "rsync -a --stats /mnt/hd/. 
> /mnt/NEWDRIVE/." should do it. Note the trailing /. on the paths, that 
> makes sure you are copying everything in the old to the new, including 
> the permissions of /mnt/hd/. itself.
Note that rsync -a option does not include -H, which is necessary to 
preserve the hard links Dirvish created.  Without it, the new drive will 
be full before the sync is complete.

-a, --archive               archive mode; equals -rlptgoD (no -H,-A,-X)

I would also recommend -S to ensure any sparse files stay sparse. 
Essential if you have VMs or use docker.  I do not believe Dirvish 
supports ACLs or extended attributes, so options -A and -X should not be 
required, but I always include them to be safe.  I also like to see 
progress, so will usually include -v (or --info=progress2 for newer rsync).

So, the full command I would use is "sudo rsync -aSHAX -v --stats 
/mnt/olddrive/ /mnt/newdrive".  The trailing slash on olddrive is 
required, and will result in the root of the new drive having the same 
attributes as the old drive.

As to the question about initializing the FS on the new drive -- One 
thing I would check is how your current backup drive inode utilization 
(tune2fs -l) is looking.  The mechanism Dirvish uses to save disk space 
results in higher-than-normal inode usage.  How high depends on how many 
backups you keep and the nature of the data you are backing up.  If your 
current "Free inodes" to "Inode count" ratio looks good, just create the 
new FS as normal.  If you are running short on inodes, read up on mke2fs 
-i option.  You will most likely be fine with the defaults.

Regards,
Nathan


More information about the Dirvish mailing list