[Borgbackup] Lots of files that change rarely and predictably

John McCabe-Dansted gmatht at gmail.com
Mon Sep 11 08:25:44 EDT 2017


Have you considered using `mount --bind` to hide the files that haven't
been changed? For example:

   mkdir backup
   mount --bind . backup
   mkdir tmp/empty
   mount --bind tmp/empty backup/old/
   ...
   if [ `date +%u` == 6 ]
   then borg create '/path/to/repo::Weekly-{now:%Y-%m-%d}'  .
   else borg create '/path/to/repo::Daily-{now:%Y-%m-%d}'  backup
   fi

Clearly restoring would involve restoring a Daily and then copying the old
files from the last Weekly




On 11 September 2017 at 18:24, Thomas Levine <_ at thomaslevine.com> wrote:

> I have a directory of about 670,683 files in a single borg repository.
> Archive creation takes a long time because borg checks all of the files.
> I should be able to make the backup go faster because the files change
> very predictably, and I seek your advice on how to do this.
>
> The directory contains emails in mail handler format, with one email per
> file. The subdirectories look like this, "->" indicating symbolic links.
>
>   old/2006
>   old/2007
>   old/2008
>   old/2009
>   old/2010
>   old/2011
>   old/2012
>   old/2013
>   old/2014
>   old/2015
>   old/2016
>   old/2017
>   drafts
>   old/current -> old/2017
>   inbox -> old/current/inbox
>   sent -> old/current/sent
>
> (It is in fact more complicated, but this gets the point across.)
>
> Usually, only the files in "drafts" and the target of "old/current"
> change. I want to configure the backups to take advantage of this
> pattern, by having borg ignore the files that I know have not changed.
>
> The only way I know to do this is to separate repositories. For example,
> I could use a separate repository for each new "old" directory and
> create new borg archives only for that directory in that repository.
> Are there other safe ways to instruct borg to consider changes only to
> particular files? I think it would work to check the files cache only
> for the files in the target of "old/current", treating all other indexed
> files as unchanged. But I'm not sure, and it does not seem to be
> supported at the moment.
>
> Thank you
> _______________________________________________
> Borgbackup mailing list
> Borgbackup at python.org
> https://mail.python.org/mailman/listinfo/borgbackup
>



-- 
John C. McCabe-Dansted
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/borgbackup/attachments/20170911/c4fa08d3/attachment.html>


More information about the Borgbackup mailing list