HAMMER history friendly backup tool
Predrag Punosevac
punosevac72 at gmail.com
Sun Apr 24 18:41:53 PDT 2016
Tomohiro Kusumi <kusumi.tomohiro at gmail.com> wrote:
> An editor like vim (under a certain condition vim uses) can't retain
> the history as well.
>
> If the application creates a new inode with the same path, the history
> is gone, because hammer looks up btree for history using inode # along
> with other keys.
> It's the same path, but different entity.
>
Is this vim specific or does it also hold true for nvi or nvi2?
Predrag
>
>
> 2016-04-25 6:27 GMT+09:00 Bomrek Koganvutram <232.20711 at chiffre.aleturo.com>:
> > * Predrag Punosevac on Tue, Mar 15, 2016 at 07:02:06PM -0400:
> >> It looks increasingly unlikely that I will get any suggestions to the
> >> original question so I am just going to post my own "solution" to the
> >> original problem.
> >
> >> I remember that after Unison sync the file history was lost. What I
> >> didn't remember until today was that Peeter noticed that the same was
> >> true with rsync
> >
> >> https://marc.info/?l=dragonfly-users&m=135885584004499&w=2
> >>
> >> which indeed shares the main algorithm with Unison. He also noticed
> >> that using scp or even a cp over NFS (my observation which is fully
> >> tested) will play well with HAMMER history. So long story short it would
> >> be fairly easily to cook up such a backup tool which will traverse the
> >> on my home directory (running OpenBSD) and just cp the files which have
> >> changed since the last run. I also tested rdiff-backup if anybody cares
> >> and the result is the same as with rsync and unison.
> >
> > Your post is now somewhat dated, but just in case: Have you tried using
> > ???--inplace??? with rsync? My guess is that it???s the way how rsync and
> > similar tools create their files that breaks HAMMER history: Instead of
> > overwriting the file, it is replaced by a new file. Since it???s a -new-
> > file, a new history will start there.
> >
> > With ???--inplace???, rsync instead overwrites the original file (which has
> > all kinds of drawbacks, that???s why it isn???t the default), but for your
> > use case perhaps it???s worth a try.
> >
> >> I remember that after Unison sync the file history was lost. What I
> >> didn't remember until today was that Peeter noticed that the same was
> >> true with rsync
> >
> > I have used Unison a few years back, and it -does- use the same
> > replace-with-new-file-approach, pretty much for the same reasons.
> >
> >> Personally I decided to run HAMMER snapshot as a cron job after rsync
> >> and in that way preserve the older version of files.
> >
> > That would have been my second suggestion; it may not be as convenient
> > as ???undo???, but at least the data is known to be preserved.
> >
> >
> > Sorry for the late answer; I flagged it a few weeks ago, but then work
> > got the better of me and I completely forgot. :o)
> >
> >
> > Cheers,
> > Bomrek
> >
> >
> > --
> > Was wir brauchen sind ein paar verr??ckte Leute
> > -- seht euch an, wohin uns die Normalen gebracht haben.
> > -- George Bernard Shaw
More information about the Users
mailing list