0

I made this nice backup system to turn drives into vdi's and put them on our network share.

Then the next day my boss walks in with 20 new machines to replace our old ones, they have 2TB drives. How am I going to back those up? my current method involves just block copying the drive using dd and converting it to a vdi. But these new drives are larger than my entire file system. And even if I got my hands on a larger drive it'd take 6+ hours to clone. The drives will likely only contain 30gb-50gb worth of data, is there any way for me to just block copy non-empty space?

1
  • How about using operating system utilities (resize2fs on linux) to resize the partition, then use p2v to virtualize it?
    – Johnny
    Feb 14, 2015 at 1:14

2 Answers 2

0

Maybe you could attach the drive and pass its data through compression?

cat /dev/sdX | bzip2 -c >sdXcompressed.bz2

To restore to another drive (as long as it's >= the first one):

bzcat sdXcompressed.bz2 >/dev/sdY

The compressed file sdXcompressed.bz2 will almost certainly be much, much smaller than the drive's size.

1
  • That doesn't really address his problem since 2TB is larger than his entire filesystem... and if he's unhappy about taking 6+ hours to clone, he's not going to be happy at the overhead of bzip2. I'd use "gzip --fast".
    – Johnny
    Feb 14, 2015 at 1:10
0

You can use partclone, it understands internals of the file system it clones so it backups only data and metadata while skipping empty space.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .