Incorporate old manual backups

Asked by ArTaX

Hi, recently we started using backintime to make backups of our server to a remote NAS (about 2 TB of data).
We took already a few of weekly snapshots, and it works well.

Now, I found an old backup of the same data, made about 1 year ago by another admin, using rsync.
Obviously there are a lot of files in common with the current structure.
It would be nice to incorporate the old backup as a "normal" snapshot of Back in Time.
I was thinking of creating a "manual" snapshot (dated to 1 year ago) following the same procedure used by Back in Time.

What do you think?

Question information

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

I assume you want to make the old backup incremental to your new snapshots!? You could run (on your NAS)

rsync -rtDH --links -pEgo --delete -v --chmod=Du+wx /path/to/old/backup \
  '/path/to/backintime/<HOST>/<USER>/<PROFILE_ID>/<LAST_YEAR_SNAPSHOT_ID>/backup/' \
  --link-dest="../../<FIRST_SNAPSHOT_ID>/backup"

to create hardlinks to your first snapshot and migrate the old backup. <LAST_YEAR_SNAPSHOT_ID> should look like 20130528-163000-123

Regards,
Germar

Revision history for this message
ArTaX (marco-zannoni) said :
#2

Thanks Germar for the answer,

if I want that backintime recognizes the old backup as a snapshot do I need to create also the following additional files?
- info
- fileinfo.bz2

Revision history for this message
Germar (germar) said :
#3

No, you don't need them. Just make sure you're using a SnapshotID like above and your files are inside <SNAPSHOT_ID>/backup folder

Revision history for this message
ArTaX (marco-zannoni) said :
#4

Hi,

in rsync's manual I read that, in order to create a hardlink, --link-dest requires that two files in /path/to/old/backup and /path/to/backintime/<FIRST_SNAPSHOT_ID>/backup "must be identical in all preserved attributes".

So, I think that there are two issues here:
1) Back in Time did not preserve attributes on the files, but save them in a separate file;
2) Our "manul old backup" was made with rsync WITHOUT keeping the attributes (mod time, owner, group, ...).

So I think that rsync should be launched without preserving attributes, so rsync will not check them:

rsync -rDH --links --delete -v --chmod=Du+wx /path/to/old/backup \
  '/path/to/backintime/<HOST>/<USER>/<PROFILE_ID>/<LAST_YEAR_SNAPSHOT_ID>/backup/' \
  --link-dest="../../<FIRST_SNAPSHOT_ID>/backup"

What do you think?

Revision history for this message
Best Germar (germar) said :
#5

1) you're right. There are two different modes ('Full rsync mode' in Options). The old and default without 'Full rsync mode' will keep permissions in fileinfo.bz2. To ignore permissions you've to replace -pEgo with '--no-p --no-g --no-o'.

2) mod-time is very important. Rsync normally compare size and mod-time to know if the file has changed. If you didn't use mod-time with the old backup you'll have to use --checksum which is quite slow.

So the command would look like:

rsync -rDH --links --checksum --no-p --no-g --no-o --delete -v --chmod=Du+wx /path/to/old/backup \
  '/path/to/backintime/<HOST>/<USER>/<PROFILE_ID>/<LAST_YEAR_SNAPSHOT_ID>/backup/' \
  --link-dest="../../<FIRST_SNAPSHOT_ID>/backup"

Revision history for this message
ArTaX (marco-zannoni) said :
#6

Thanks Germar, your command worked well, now the backup is recognized by Back In Time.

Revision history for this message
ArTaX (marco-zannoni) said :
#7

Thanks Germar, that solved my question.