Alexander Leidinger

Just another weblog

Jan
19

Improv­ing the order of direc­to­ries to backup in tarsnap

I exper­i­mented a lit­tle bit with the order of direc­to­ries to backup in tarsnap.

Cur­rently I use the fol­low­ing sort­ing algo­rithm:

  1. least fre­quently changed directory-trees first
    Every change — even in meta-data — will affect the fol­low­ing data, as tarsnap is doing the de-duplication in fixed-width blocks (AFAIR 64k).
  2. for those directory-trees which change with the same fre­quency: list the big­ger ones first
    Implic­itly I assume that the smaller ones are much smaller than the big­ger ones so that the smaller part which will be backed up will not be noticed because of the big­ger change. For my use cases of tarsnap this is true.
  3. if changes in a directory-tree are much much big­ger than any­thing else, but the directory-tree has a medium change-frequency, put it even before less-frequently chang­ing stuff
    I do not want that a small change trig­gers a big backup, but a big backup can con­tain the remain­ing small part.
  4. if you backup home direc­to­ries (even root’s one) and they do not con­tain much data, put them before directory-trees which change a lot daily
    I do not want that a login trig­gers the trans­fer of data in other directory-trees which have not changed.
GD Star Rat­ing
load­ing…
GD Star Rat­ing
load­ing…
Share/Save

Tags: , , , , , , ,