Big change in size with copy

Asked by kabanta

I have a BIT backup directory that is currently about 87GB (on a 300GB drive) and which I want to move to a new 1TB hard-drive.

However, when I try to copy the original "backintime" folder using "cp", the new/resulting "backintime" folder is MUCH much bigger. I saw a related post that suggested using "dd" if the drive hasn't already been used. But I have already put stuff on the new drive so I would rather not repeat all of that (also, there is other material on the original drive). Will "dd" still work -- and if so, how? If not, is there an alternative copy method that will preserve the size and hard-links?

Question information

Language:
English Edit question
Status:
Answered
For:
Back In Time Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Germar (germar) said :
#1

BIT uses hard-links to handle incremental backups. cp doesn't preserve hard-links and so it made a full copy of every snapshot you have. That's why your new backintime folder is much bigger.
You can use "rsync -aH /path/to/old-hdd /path/to/new-hdd" to copy all snapshots. "-H" will preserve hard-links in this case. But you have to make sure, that the filesystem is able to handle hard-links on your new drive. I'd suggest to use "ext3".

"dd" does copy your entire hdd block-wise and override all data that is already stored on the new hdd.

Revision history for this message
kabanta (knubee) said :
#2

Thanks for the tip. I will try rsync and see if that works.

Revision history for this message
kabanta (knubee) said :
#3

Hmm. Tried this and the copy still expanded. Both drives are ext4, which should work. However, the destination is a Truecrypt container (formatted as ext4). I wonder if that is a factor.

Revision history for this message
Dan (danleweb) said :
#4

Once you copied everything you can try to use freedup (http://linux.die.net/man/1/freedup) to replace duplicates with hardlinks.

Regards,
Dan

Can you help with this problem?

Provide an answer of your own, or ask kabanta for more information if necessary.

To post a message you must log in.