schneerunzel
Goto Top

BackupPC - BackupFilesExclude Funktioniert nicht

Hallo zusammen,

ich setzte zur Sicherung meiner Umgebung Backuppc ein. Das funktioniert auch ganz gut.
Allerdings möchte ich jetzt ein Linux System mittels Rsync sichern. Auf diesem System liegt unter /var/lib/opsi/depot eine Verzeichnis, das sehr groß ist und in dem Fall nicht gesichert werden muss.

Ich habe im Internet geschaut und bin der Meinung, das ich es wie folgt richtig eingetragen habe:
unbenannt

Wenn ich mir aber jetzt den Prozess ansehe sehe ich folgendes mit ps -ef | grep backuppc:
backuppc 15062 15059 2 18:39 ? 00:00:00 /usr/bin/ssh -q -x -l root de01srv02 /usr/bin/rsync --server --sender --numeric-ids --perms --owner --group -D --links --hard-links --times --block-size=2048 --recursive --ignore-times . /var/

Auch auf der gegenstelle sehe ich, dass die Dateien unter /var/lib/opsi/depot angefasst werden.

Auch die Configdatei sieht nicht so schlecht aus:
$Conf{PingMaxMsec} = 200;
$Conf{RsyncShareName} = [
  '/var',  
  '/home/samba',  
  '/etc',  
  '/usr',  
  '/bin',  
  '/tmp',  
  '/opt',  
  '/root',  
  '/srv',  
];
$Conf{RsyncArgs} = [
  '--numeric-ids',  
  '--perms',  
  '--owner',  
  '--group',  
  '-D',  
  '--links',  
  '--hard-links',  
  '--times',  
  '--block-size=2048',  
  '--recursive'  
];
$Conf{BackupFilesExclude} = {
  '/var' => [  
    '/lib/opsi/depot'  
  ]
};

Das folgende habe ich auch schon probiert -> gleiches Ergebnis:
unbenannt1 (2)

Evtl habe ich folgende Hinweise falsch verstanden:
192.168.159.72/backuppc/index.cgi?action=view&type=docs#_conf_backupfilesexclude_
sourceforge.net/p/backuppc/mailman/message/13912572/
sourceforge.net/p/backuppc/mailman/message/28418632/

Hat jemand da schon mal Erfahrungen gesammelt?

p.s. Ich habe auch schon versucht den --exclude in die RsyncArgs Liste aufzunehmen. Leider auch ohne Erfolg.

Content-Key: 346862

Url: https://administrator.de/contentid/346862

Printed on: April 25, 2024 at 15:04 o'clock

Member: BassFishFox
BassFishFox Aug 21, 2017 updated at 18:16:50 (UTC)
Goto Top
Hallo,

Deine Links zu http://192.168.*.* funktionieren natuerlich wunderpraechtig. face-wink

Ich kenn das Programm nicht. Aber ist das Verzeichnis was Du auschliessen willst auf der gleichen Partition?

Probier es mal mit :

--exclude=/var/lib/opsi/depot'  

oder dem anderen dort genannten :

$Conf{BackupFilesExclude} = {
        '/' => [  
                '/var/lib/opsi/depot',  
        ],
}

BFF
Member: schneerunzel
schneerunzel Aug 21, 2017 at 17:55:03 (UTC)
Goto Top
Entschuldigung. Auf den Link habe ich gar nicht geachtet. Hier ein der Ausschnitt:
$Conf{BackupFilesExclude} = undef;
List of directories or files to exclude from the backup. For Smb, only one of $Conf{BackupFilesExclude} and $Conf{BackupFilesOnly} can be specified per share. If both are set for a particular share, then $Conf{BackupFilesOnly} takes precedence and $Conf{BackupFilesExclude} is ignored.

This can be set to a string, an array of strings, or, in the case of multiple shares, a hash of strings or arrays. A hash is used to give a list of directories or files to exclude for each share (the share name is the key). If this is set to just a string or array, and $Conf{SmbShareName} contains multiple share names, then the setting is assumed to apply to all shares.

The exact behavior is determined by the underlying transport program, smbclient or tar. For smbclient the exlclude file list is passed into the X option. Simple shell wild-cards using "*" or "?" are allowed.

For tar, if the exclude file contains a "/" it is assumed to be anchored at the start of the string. Since all the tar paths start with "./", BackupPC prepends a "." if the exclude file starts with a "/". Note that GNU tar version >= 1.13.7 is required for the exclude option to work correctly. For linux or unix machines you should add "/proc" to $Conf{BackupFilesExclude} unless you have specified --one-file-system in $Conf{TarClientCmd} or --one-file-system in $Conf{RsyncArgs}. Also, for tar, do not use a trailing "/" in the directory name: a trailing "/" causes the name to not match and the directory will not be excluded.

Users report that for smbclient you should specify a directory followed by "/*", eg: "/proc/*", instead of just "/proc".

FTP servers are traversed recursively so excluding directories will also exclude its contents. You can use the wildcard characters "*" and "?" to define files for inclusion and exclusion. Both attributes $Conf{BackupFilesOnly} and $Conf{BackupFilesExclude} can be defined for the same share.

If a hash is used, a special key "*" means it applies to all shares that don't have a specific entry.

Examples:

$Conf{BackupFilesExclude} = '/temp';
$Conf{BackupFilesExclude} = ['/temp']; # same as first example
$Conf{BackupFilesExclude} = ['/temp', '/winnt/tmp'];
$Conf{BackupFilesExclude} = {
'c' => ['/temp', '/winnt/tmp'], # these are for 'c' share
'd' => ['/junk', '/dont_back_this_up'], # these are for 'd' share
};
$Conf{BackupFilesExclude} = {
'c' => ['/temp', '/winnt/tmp'], # these are for 'c' share
'*' => ['/junk', '/dont_back_this_up'], # these are for other shares


Ich habe die Tipps probiert, leider auch ohne Erfolg.
Member: BassFishFox
Solution BassFishFox Aug 21, 2017 at 18:25:46 (UTC)
Goto Top
Hallo,

Nimm mal das /var komplett raus (Zeile 3) sowie /tmp (Zeile 8) und probiere es nochmal.

Wenn irgendwas in /var angefasst wird, ist irgendwo Bockmist.

BFF