Skip to content

Commit

Permalink
fix snapshot restore issue
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Morrison <matt@mojo.net.nz>
  • Loading branch information
sl1pm4t committed May 19, 2015
1 parent 726c07f commit bf0fe83
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lxd/containers.go
Expand Up @@ -940,12 +940,12 @@ func containerSnapRestore(d *Daemon, name string, snap string) error {
containerRootFSPath := migration.AddSlash(fmt.Sprintf("%s/%s", containerRootPath, "rootfs"))
shared.Debugf("RESTORE => Copying %s to %s", snapshotRootFSPath, containerRootFSPath)

rsync_debug := ""
rsync_verbosity := "-q"
if *debug {
rsync_debug = "-vi"
rsync_verbosity = "-vi"
}

output, err := exec.Command("rsync", "-a", "-c", "-HAX", "--devices", "--delete", rsync_debug, snapshotRootFSPath, containerRootFSPath).CombinedOutput()
output, err := exec.Command("rsync", "-a", "-c", "-HAX", "--devices", "--delete", rsync_verbosity, snapshotRootFSPath, containerRootFSPath).CombinedOutput()
shared.Debugf("RESTORE => rsync output\n%s", output)

if err == nil && !source.isPrivileged() {
Expand Down

0 comments on commit bf0fe83

Please sign in to comment.