mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +03:00
netcmd: Use correct path for state directory during offline backup
During the restore process, we use make_smbconf() to create a new smb.conf file with the default paths. The default location for 'state directory' is 'state', but we currently rename this directory to 'statedir' on backing up, so it will end up pointing to a non-existent directory. This commit ensures the names are consistent. Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
This commit is contained in:
parent
11dae9cf36
commit
fb0d71b358
@ -1077,7 +1077,7 @@ class cmd_domain_backup_offline(samba.netcmd.Command):
|
||||
# Find where a path should go in the fixed backup archive structure.
|
||||
def get_arc_path(self, path, conf_paths):
|
||||
backup_dirs = {"private": conf_paths.private_dir,
|
||||
"statedir": conf_paths.state_dir,
|
||||
"state": conf_paths.state_dir,
|
||||
"etc": os.path.dirname(conf_paths.smbconf)}
|
||||
matching_dirs = [(_, p) for (_, p) in backup_dirs.items() if
|
||||
path.startswith(p)]
|
||||
|
Loading…
Reference in New Issue
Block a user