rsnapshot in Lucid does not support using link_dest and sync_first simultaneously

Bug #519031 reported by Ted Cabeen
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
rsnapshot (Ubuntu)
Fix Committed
Undecided
Unassigned
Nominated for Lucid by Ted Cabeen

Bug Description

Binary package hint: rsnapshot

DESCRIPTION
rsnapshot 1.3.0 (the version in lucid) has a known bug that makes rsnapshot create a plain copy of the files instead of create hard links for all but the first backup point when using both the options link_dest (use rsnapshot's link-dest feature) and sync_first (seperate the rsync phase from the directory rotation logic).
This renders rsnapshot mostly useless in this configuration, since it will then consume huge portions of disk space instead of beeing rather frugal.
This bug is mentioned in the rsnapshot FAQ as the third question: http://rsnapshot.org/faq.html and was fixed in v1.3.1 (released with Maverick).

STEPS TO REPRODUCE
- Change the default config: link_dest[TAB]1 and sync_first[TAB]1, snapshot_root[TAB]/tmp/
- run "sudo rsnapshot sync && sudo rsnapshot hourly ; sudo rsnapshot sync && sudo rsnapshot hourly"
- observe that the files in hourly.0 and hourly.1 are not hardlinks: the link count for is always 1 for /tmp/hourly.*/localhost/etc/hosts and the inode number is not the same:

FIX
A minimal patch is provided as a bazaar branch.

REGRESSION POTENTIAL
The fix short-circuits a failed attempt at smartly deciding whether --link-dest is usefull or not. The fix always call rsync with --link-dest.
This is not an issue for rsnapshot because --link-dest can only help rsync create more hard links - unless there is a bug in rsync itself.
So the risk is rather low.

Revision history for this message
Toby Corkindale (tjc-wintrmute) wrote :

This bug effected me, and was rather annoying to debug.

After going to the trouble of reporting it upstream, I discovered it's already fixed in rsnapshot 1.3.1 as packaged in Maverick.

I suggest that version is backported to Lucid - it's just fixes in there after all, and this bug causes serious diskspace waste! (It loses the --link-dest parameter on all but the first backup directory, thus taking an entire copy.. the whole point of rsnapshot is to avoid taking those entire copies!)

Revision history for this message
Numérigraphe (numerigraphe) wrote :

This is a known bug in 1.3.0 indeed. I'll see if I can isolate the patchset needed to fix this, so we can propose this for lucid updates.
Lionel Sausin

Changed in rsnapshot (Ubuntu):
status: New → Confirmed
Revision history for this message
Numérigraphe (numerigraphe) wrote :

The minimal fix is to not test whether the .sync directory exists, as was introduced upsteam in rsnapshot-program.pl v1.377.
A patch is available at http://rsnapshot.cvs.sourceforge.net/viewvc/rsnapshot/rsnapshot/rsnapshot-program.pl?r1=1.377&r2=1.378&view=patch
I pushed a branch with this fix at lp:~numerigraphe/rsnapshot/fix-sync_first-link_dest .

FYI, a cleanup patch was also applied upstream in rsnapshot-program.pl v1.416, but it doesn't apply cleanly to the code in lucid. This patch is at http://rsnapshot.cvs.sourceforge.net/viewvc/rsnapshot/rsnapshot/rsnapshot-program.pl?r1=1.415&r2=1.416&view=patch

Lionel.

Revision history for this message
Numérigraphe (numerigraphe) wrote :

I just pushed a patched version on our PPA, all subscribers could you please report if this fixes the problem?
Then we could ask for inclusion in lucid.
Lionel.

Changed in rsnapshot (Ubuntu):
status: Confirmed → Fix Committed
Revision history for this message
Numérigraphe (numerigraphe) wrote :

I forgot to mention the URL of the PPA : https://launchpad.net/~numerigraphe/+archive/ppa .
The package is waiting to build, but should be available soon.
Lionel.

Revision history for this message
Ivan Kharlamov (the-paper-men) wrote :

Lucid package has other bugs which are fixed in debian, including this one https://bugs.launchpad.net/ubuntu/lucid/+source/rsnapshot/+bug/724035
But I was unable to contact anyone to update the package in Lucid. Maybe I was writing to wrong people, I didn't get any response.

summary: - rsnapshot does not support using link_dest and sync_first simultaneously
+ rsnapshot in Lucid does not support using link_dest and sync_first
+ simultaneously
Revision history for this message
Numérigraphe (numerigraphe) wrote :

Dear Ubuntu SRU team,
Would you please be so kind as to look into this bug and its proposed resolution?
I have updated the bug description to match the SRU procedure to the best of my abilities.
Thanks in advance,
Lionel Sausin.

description: updated
Revision history for this message
Ivan Kharlamov (the-paper-men) wrote :

SRU people, hello! If you are reading, please remove the redundant dependency on openssh-server during the package update. ( https://bugs.launchpad.net/ubuntu/lucid/+source/rsnapshot/+bug/724035 )

Best regards,
Ivan

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.