Skip to content

feat(cmd): add backup command - #99

Draft
ishaan-jindal wants to merge 10 commits into
lxc:mainfrom
ishaan-jindal:feat/backup
Draft

feat(cmd): add backup command#99
ishaan-jindal wants to merge 10 commits into
lxc:mainfrom
ishaan-jindal:feat/backup

Conversation

@ishaan-jindal

@ishaan-jindal ishaan-jindal commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Would close #45

@jochumdev jochumdev left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work, thank you.

See the comments and please make sure that you inline every helper that is used only once or even twice.

Comment thread cmd/incus-compose/backup.go Outdated
Comment thread client/backup.go Outdated
Comment thread client/backup.go Outdated
Comment thread client/backup.go Outdated
Comment thread client/backup.go Outdated
Comment thread client/backup.go Outdated
Comment thread cmd/incus-compose/backup.go Outdated
Comment thread cmd/incus-compose/backup.go Outdated
Comment thread cmd/incus-compose/backup.go Outdated
Comment thread client/backup.go Outdated
@jochumdev

Copy link
Copy Markdown
Member

Solid work! Thanks for resolving everything.

Next thing is progress, I don't think we get the percentage from incus but we can a show a spinner per volume.

I would like to add some more changes, we can squash those after, ok?

@ishaan-jindal

Copy link
Copy Markdown
Contributor Author

Sure Squash at the end works.
Heads up: I'm adding a few more lock tests first

@ishaan-jindal

Copy link
Copy Markdown
Contributor Author

relock interval every 30 seconds
Since, refresh = stale (both 60s) is zero margin

@jochumdev

Copy link
Copy Markdown
Member

Last commit looks damn great! Had no detailed look at it yet as I'm working on a healthd rewrite, will check later.

@ishaan-jindal

Copy link
Copy Markdown
Contributor Author

@jochumdev I am hitting a latent DNS watcher race: two processes with watchers on the same network (e.g. concurrent stop/up, or two backup create) PATCH the network simultaneously and trip server-side idempotency races — Failed to add address ... already assigned and Failed clearing firewall ... chain not found. The ETag retry (client_dnswatcher.go:186) doesn't cover these; the end state is correct either way.

Full disclosure: I ran this through an AI to trace the root cause, and this is the output I got — my parallel backup test hits it.

Would you treat those two errors as benign (or retry) in the watcher?

@jochumdev

Copy link
Copy Markdown
Member

Nice bug you found. I was never a friend of retry but recently I became friends with it, so go retry.

It's ok to have that bugfix in this branch :)

And about DNS in general, soon we will have CoreDNS with AXFR from incus network zones and ECS on top.
Means no more dnsmasq.

@ishaan-jindal
ishaan-jindal force-pushed the feat/backup branch 2 times, most recently from e2ed74e to ed586b6 Compare August 6, 2026 05:48
ishaan-jindal and others added 10 commits August 7, 2026 13:45
Signed-off-by: Ishaan Jindal <ishaanjindal2006@gmail.com>
Signed-off-by: Ishaan Jindal <ishaanjindal2006@gmail.com>
Signed-off-by: Ishaan Jindal <ishaanjindal2006@gmail.com>
Signed-off-by: Ishaan Jindal <ishaanjindal2006@gmail.com>
Signed-off-by: Ishaan Jindal <ishaanjindal2006@gmail.com>
Signed-off-by: Ishaan Jindal <ishaanjindal2006@gmail.com>
Signed-off-by: Ishaan Jindal <ishaanjindal2006@gmail.com>
Signed-off-by: Ishaan Jindal <ishaanjindal2006@gmail.com>
Signed-off-by: Ishaan Jindal <ishaanjindal2006@gmail.com>
Signed-off-by: René Jochum <rene@jochum.dev>
@jochumdev

Copy link
Copy Markdown
Member

Done on the update.

Integrated your logic as an "Action", using one file per run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

backup command — snapshot project volumes

2 participants