Oublis...
This commit is contained in:
parent
470227a2f4
commit
3c27d55ddd
1 changed files with 17 additions and 12 deletions
|
@ -50,14 +50,19 @@ if __name__ == "__main__":
|
|||
for homeDir in backups.HomeHosts:
|
||||
with open(rootpath + "home-" + homeDir + ".pl", "w") as fichier:
|
||||
fichier.write("""# Ces fichiers servent à backuper les homes en séparé.
|
||||
$Conf{ClientTimeout} = 86400;
|
||||
|
||||
$Conf{ClientNameAlias} = 'localhost';
|
||||
$Conf{XferMethod} = 'tar';
|
||||
$Conf{TarShareName} = ['/home/%(share)s'];
|
||||
$Conf{TarClientPath} = '/usr/bin/env LC_ALL=C sudo /usr/local/bin/backuppc_tar -v -f - -C $shareName';
|
||||
$Conf{TarClientCmd} = '/usr/bin/env LC_ALL=C sudo /usr/local/bin/backuppc_tar -v -f - -C $shareName --totals';
|
||||
|
||||
$Conf{BackupFilesExclude} = {
|
||||
'/home-adh/%(share)s' => ['lost+found'],
|
||||
};""" % {'share' : homeDir, 'myip' : backups.ipnfs})
|
||||
'/home/%(share)s' => ['lost+found'],
|
||||
};
|
||||
|
||||
# remove extra shell escapes ($fileList+ etc.) that are
|
||||
# needed for remote backups but may break local ones
|
||||
$Conf{TarFullArgs} = '$fileList';
|
||||
$Conf{TarIncrArgs} = '--newer=$incrDate $fileList';
|
||||
""" % {'share' : homeDir,})
|
||||
os.chmod(rootpath + "home-" + homeDir + ".pl", 0644)
|
||||
os.chown(rootpath + "home-" + homeDir + ".pl", root, wwwdata)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue