Discussion:
[BackupPC-devel] Getting excludes right...
Richard Shaw
2017-04-29 12:44:39 UTC
Permalink
I'm trying to exclude .cache from all /home backups but can't quite seem to
get it right...

Right now out of desparation I'm trying:

Share name => "*"
Exclude => "/.cache"

I though that the "*" would match "/home/<user>" and then it would put it
together to be:

/home/<user>/.cache

But I just did an incremental backup and no luck...

Thanks,
Richard
Richard Shaw
2017-04-29 13:05:17 UTC
Permalink
Ok, getting a little closer... I changed the configuration to:

$Conf{BackupFilesExclude} = {
'*' => [
'/home/*/.cache',
''
]
};

And ran the dump from the command line and got:

--exclude=/home/\*/.cache --exclude= <host>:/home/<user>/

It seemed to generate two excludes but the second one seems to be malformed
with the space after the = and I'm not sure it's even needed...

Thanks,
Richard
Michael Stowe
2017-04-29 14:47:02 UTC
Permalink
Post by Richard Shaw
$Conf{BackupFilesExclude} = {
'*' => [
'/home/*/.cache',
''
]
};
--exclude=/home/\*/.cache --exclude= <host>:/home/<user>/
It seemed to generate two excludes but the second one seems to be
malformed with the space after the = and I'm not sure it's even
needed...
Thanks,
Richard
... which begs the question, why did you include it? Why not just use
the first exclude, which seems perfectly valid, i.e.

$Conf{BackupFilesExclude} = {
'*' => [
'/home/*/.cache'
]
};

I'm genuinely baffled.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
BackupPC-devel mailing list
BackupPC-***@lists.sourceforge.net
List: https://lists.sourceforge.net/lists/listinfo/backuppc-devel
Wiki: http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/
Craig Barratt
2017-04-29 21:07:31 UTC
Permalink
In addition to getting the exclude settings right, in 4.x if you add an
exclude for an already backed-up file or directory, the file or directory
won't be backed up (correct), but won't get deleted on the server, so it
will be still be visible in the most recent filled/full backup (incorrect).

If that's an issue you have, you can add the --delete-excluded option to
$Conf{RsyncArgs} to fix this. I pushed that change to git in a few days
ago and it will be in 4.1.2.

Craig
Post by Michael Stowe
Post by Richard Shaw
$Conf{BackupFilesExclude} = {
'*' => [
'/home/*/.cache',
''
]
};
--exclude=/home/\*/.cache --exclude= <host>:/home/<user>/
It seemed to generate two excludes but the second one seems to be
malformed with the space after the = and I'm not sure it's even
needed...
Thanks,
Richard
... which begs the question, why did you include it? Why not just use
the first exclude, which seems perfectly valid, i.e.
$Conf{BackupFilesExclude} = {
'*' => [
'/home/*/.cache'
]
};
I'm genuinely baffled.
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
BackupPC-devel mailing list
List: https://lists.sourceforge.net/lists/listinfo/backuppc-devel
Wiki: http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/
Richard Shaw
2017-04-29 21:47:56 UTC
Permalink
On Sat, Apr 29, 2017 at 4:07 PM, Craig Barratt <
Post by Craig Barratt
In addition to getting the exclude settings right, in 4.x if you add an
exclude for an already backed-up file or directory, the file or directory
won't be backed up (correct), but won't get deleted on the server, so it
will be still be visible in the most recent filled/full backup (incorrect).
If that's an issue you have, you can add the --delete-excluded option to
$Conf{RsyncArgs} to fix this. I pushed that change to git in a few days
ago and it will be in 4.1.2.
Ok, I'm not out of disk space or anything so I'm not worried about killing
it off retroactively but I was kinda using the last incremental to tell if
the excludes worked correctly.

Thanks,
Richard
Richard Shaw
2017-04-29 21:48:45 UTC
Permalink
... which begs the question, why did you include it? Why not just use the
first exclude, which seems perfectly valid, i.e.
$Conf{BackupFilesExclude} = {
'*' => [
'/home/*/.cache'
]
};
I'm genuinely baffled.
For posterity I'll answer, since it stayed in the last incremental I
assumed it was not working.

Thanks,
Richard

Continue reading on narkive:
Loading...