[Dirvish] replicate a vault with hardlinks

Vortex vortex at versanet.de
Sun Oct 9 08:11:27 UTC 2016

On 09.10.2016 09:11, Richard Hector wrote:
> Yes, both vaults will be on the same filesystem.

And you're more precise than I was, myself speaking of hard drive
instead of filesystem. :*)

> My current plan is to write a script (which I've started) which will
> copy the structure of the vault, possibly editing the config and other
> administrative files, but merely hardlinking the contents of the
> actual backup trees.

Just curious, but why a script if one cp -al and some manual config
editing will do? :)

> Hopefully you're using a fixed-width font ...

Of course! :D

> Once I've done this, I hope I'll be able to continue backing up to
> both vaults temporarily (just in case I stuff up the migration, and
> have the old server writing to its maildir instead of relaying to the
> new one), which will of course cause them to diverge.

Again, mind that you'll have only one set of data in the hard linked
files. I don't know exactly how dirvish would handle this, but I see a
risk in mixing different file contents from both servers into one hard
linked file data in the backup. Only new files would be independent.

For example: File A exists in both servers at the time of hard linking.
After that, one server modifies it. Depending on the order of backing
them up, the vault file will get the data from either server, but the
backup of the other server will have it too.

If you wouldn't use (and backup) the old server after setting up the new
one, there wouldn't be a problem. But both servers still modifying the
files that are hard linked *only in the backup* would be.

That said, another solution would be hard linking the files also on the
original file system, so that their contents never differ. A handy tool
that hard links all identical files subsequently is "hardlink" by J.A.


It may be part of your system's software repositories. (Ubuntu has it.)

>> I find it more convenient to have separate vaults for different
>> sources. It keeps them clearly arranged and I can address them
>> separately or move one of them to another medium easily.
> Agreed. But having the actual backed-up files hardlinked between
> vaults shouldn't hinder that, right?

No, apart from the adressed problem of hard linked files that are
modified separately afterwards.



"Um einen veritablen Skandal zu produzieren, muss man sich ... schon
sehr anstrengen. Die Telekom hat das durch die Bespitzelung von Mana-
gern und Journalisten mit Bravour geschafft und ist dabei elegant an
Lidl vorbeigezogen. Extrapunkte gab es fuer den Einsatz ehemaliger
Stasi-Mitarbeiter." – Editorial der c't 13/2008

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://lists.dirvish.org/pipermail/dirvish/attachments/20161009/a315a389/attachment.sig>

More information about the Dirvish mailing list