Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/lxd-to-incus: Handle backups/images volumes #174

Merged
merged 1 commit into from
Oct 18, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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