Skip to content

Linux: Brackup – Convert existing Target to not use colons in chunk names

October 18, 2012

I haven’t posted in a while. Going to try and fix that, maybe post shorter stuff more often.

I’ve been using Brackup lately, which seems to be a good but little known backup/dedupe tool. When it goes to back up a file it stores it in chunks. Some of its storage backends use colons in the chunk names and some don’t.


There are a few gotchas when doing this, though. One is that Target::Filesystem backups default to using colons in their chunk file names on Unix-like filesystems (for backwards-compatibility reasons), while Target::Ftp and Target::Sftp ones don’t. The safest thing to do is just to turn off colons altogether on Filesystem targets:

type = Filesystem
path = /export/brackup/nox/home
no_filename_colons = 1

I didn’t see that until after I’d done some backing up and I didn’t want to start over. I wanted to know if it is possible to just rename the chunks and change the config and have everything work right. Looks like you can. This worked for me but YMMV!

find /media/backups/brackup_targets/server_fs_home/ -type f | \
   grep : | sed -e 's/\(.*\)/\1 \1/' -e 's/\(\ .*\):/\1./' -e 's/^/mv /' | sh

The idea is to get a list of the chunks (i.e.: /media/backups/brackup_targets/sharedfile_backups/a0/00/sha1:SUM .chunk) and create a list of commands to pipe to sh that will change the ‘:’ in the names to ‘.’ (i.e.: mv sha1:SUM.chunk sha1.SUM.chunk but with the full paths)

No comments yet

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: