Skip to content

Commit

Permalink
Merge pull request #174 from stgraber/main
Browse files Browse the repository at this point in the history
cmd/lxd-to-incus: Handle backups/images volumes
  • Loading branch information
freeekanayaka committed Oct 18, 2023
2 parents 16595fe + b64c62e commit c0b0dca
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmd/lxd-to-incus/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,11 @@ Instances will come back online once the migration is complete.
// Cleanup paths.
fmt.Println("=> Cleaning up target paths")

for _, dir := range []string{"backups", "images"} {
// Remove any potential symlink (ignore errors for real directories).
_ = os.Remove(filepath.Join(targetPaths.Daemon, dir))
}

for _, dir := range []string{"devices", "devlxd", "security", "shmounts"} {
err = os.RemoveAll(filepath.Join(targetPaths.Daemon, dir))
if err != nil && !os.IsNotExist(err) {
Expand Down

0 comments on commit c0b0dca

Please sign in to comment.