Include/Exclude advice

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Include/Exclude advice

Ron Leach
List, good morning,

We use rdiff-backup to regularly backup our debian file-server, and we
wanted to additionally run a partial backup - into the same backup
directory - much more frequently for the more-volatile files (all the
files in our current projects).  But when following the example from
http://www.nongnu.org/rdiff-backup/examples.html

rdiff-backup --include /srv/files/currentprojects --exclude '**'
/srv/files /backup-location

rdiff-backup also seemed to make increments of all the other files in
the *other* directories under /srv/files.  I didn't expect this - I
had thought that the example I used would exclude all the directories
below /srv/files other than /srv/files/currentprojects .

I've read the man page especially the FILE SELECTION section, but I
think I have misunderstood the file include and exclude options, or
misunderstood the example.  I admit that I didn't find the man page
easy to follow.

Is it possible to backup:
- only /srv/files/currentprojects,
- into the same backup directory that our full backup of /srv/files is
stored,
- with the intention that the currentprojects directory is backed-up
much more frequently
- but would still be restored if ever a complete restoration of
/srv/files were needed?

Grateful for any comment or advice,

regards, Ron

_______________________________________________
rdiff-backup-users mailing list at [hidden email]
https://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki
Reply | Threaded
Open this post in threaded view
|

Re: Include/Exclude advice

Mike Fleetwood
On 23 June 2017 at 11:15, Ron Leach <[hidden email]> wrote:

> List, good morning,
>
> We use rdiff-backup to regularly backup our debian file-server, and we
> wanted to additionally run a partial backup - into the same backup directory
> - much more frequently for the more-volatile files (all the files in our
> current projects).  But when following the example from
> http://www.nongnu.org/rdiff-backup/examples.html
>
> rdiff-backup --include /srv/files/currentprojects --exclude '**' /srv/files
> /backup-location
>
> rdiff-backup also seemed to make increments of all the other files in the
> *other* directories under /srv/files.  I didn't expect this - I had thought
> that the example I used would exclude all the directories below /srv/files
> other than /srv/files/currentprojects .
>
> I've read the man page especially the FILE SELECTION section, but I think I
> have misunderstood the file include and exclude options, or misunderstood
> the example.  I admit that I didn't find the man page easy to follow.
>
> Is it possible to backup:
> - only /srv/files/currentprojects,
> - into the same backup directory that our full backup of /srv/files is
> stored,
> - with the intention that the currentprojects directory is backed-up much
> more frequently
> - but would still be restored if ever a complete restoration of /srv/files
> were needed?
>
> Grateful for any comment or advice,
>
> regards, Ron

I am no expert, but you experience coincides with my expectation that;
backing up part of a directory tree to an rdiff-backup repository is
implicitly saying all the excluded files have been removed so
rdiff-backup records them as being deleted in the repository.

I would say it is impossible to achieve what you want.  I suggest that
you will have to do something like this:

daily : rdiff-backup --exclude /srv/files/currentprojects /srv/files
/backup-location-1
hourly: rdiff-backup /srv/files/currentprojects /backup-location-2

and restore from both repositories when needed.

Mike

_______________________________________________
rdiff-backup-users mailing list at [hidden email]
https://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki
Reply | Threaded
Open this post in threaded view
|

Re: Include/Exclude advice

Ron Leach
On 23/06/2017 11:46, Mike Fleetwood wrote:

> On 23 June 2017 at 11:15, Ron Leach<[hidden email]>  wrote:
>>
>> rdiff-backup also seemed to make increments of all the other files in the
>> *other* directories under /srv/files.  I didn't expect this - I had thought
>> that the example I used would exclude all the directories below /srv/files
>> other than /srv/files/currentprojects .
>>
>
> I am no expert, but you experience coincides with my expectation that;
> backing up part of a directory tree to an rdiff-backup repository is
> implicitly saying all the excluded files have been removed so
> rdiff-backup records them as being deleted in the repository.
>

Ah.  I wonder if, indeed, that's right; I hadn't thought of it that way.

Mike, thanks for that insight, I'll have to rethink what we're doing.

regards, Ron

_______________________________________________
rdiff-backup-users mailing list at [hidden email]
https://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki