[Box Backup] How to include a single file?

Ben Summers boxbackup@fluffy.co.uk
Sun, 1 Feb 2004 09:06:32 +0000


On 31 Jan 2004, at 21:59, Eduardo Alvarenga wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On Sat, 31 Jan 2004, Ben Summers wrote:
>
>>>  I'm trying to backup "/bsd" (single file) and it is not working:
>>
>> The "Path" must be a directory, not a file. I suggest you create a
>> directory on the same filesystem as the file you want to back up, and
>> hard link the file into it (not symlink). Then backup that directory.
>>
>> Is this a major limitation?
>
>  Sure. I want to backup some files without touching them. I have some
>  directories which I want only some files to be backuped (temp files
>  come to mind). Regex will be welcome too.

You have a version which does Regex excludes.

>
>  If you mind, please change "Path =" to something like "Include ="
>  beeing it a directory or not.
>
>  If you have time today, (an of course, IF want to make it) please send
>  me a new snapshot, I have to implement the backup schema today since
>  today is saturday and no one is working here.

Actually, I spoke too soon. It is possible to do exactly what you want 
by use of regular expressions -- set the path to be the containing 
directory and exclude all the things you don't want to back up.

For example...

root-for-bsd
{
	Path = /
	ExcludeDirsRegex = .
	ExcludeFilesRegex = ^[^b][^s][^d]
}

Of course, this is a little clumsy (and this example won't actually 
work in the general case, just in the case of a normal root directory), 
and would be easier if I added way of saying "not" a regular 
expression.

>
>  And, how about splitting boxbackup into 2 files? A server and a client
>  one?

The distribution files would be about the same size. I see little 
point, especially as you don't have to make the parcel you don't want.

   make parcels/boxbackup-0.03-backup-client-OpenBSD.tgz

But... given that they share so much code, making the server if you've 
made the client doesn't take much longer, so I didn't think it would be 
worth making this neater.

Ben