Oublis...

This commit is contained in:
Pierre-Elliott Bécue 2014-12-16 02:25:32 +01:00
parent 470227a2f4
commit 3c27d55ddd

View file

@ -50,14 +50,19 @@ if __name__ == "__main__":
for homeDir in backups.HomeHosts: for homeDir in backups.HomeHosts:
with open(rootpath + "home-" + homeDir + ".pl", "w") as fichier: with open(rootpath + "home-" + homeDir + ".pl", "w") as fichier:
fichier.write("""# Ces fichiers servent à backuper les homes en séparé. fichier.write("""# Ces fichiers servent à backuper les homes en séparé.
$Conf{ClientTimeout} = 86400; $Conf{ClientNameAlias} = 'localhost';
$Conf{XferMethod} = 'tar'; $Conf{XferMethod} = 'tar';
$Conf{TarShareName} = ['/home/%(share)s']; $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} = { $Conf{BackupFilesExclude} = {
'/home-adh/%(share)s' => ['lost+found'], '/home/%(share)s' => ['lost+found'],
};""" % {'share' : homeDir, 'myip' : backups.ipnfs}) };
# 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.chmod(rootpath + "home-" + homeDir + ".pl", 0644)
os.chown(rootpath + "home-" + homeDir + ".pl", root, wwwdata) os.chown(rootpath + "home-" + homeDir + ".pl", root, wwwdata)