Backupbot Revolution #23

Merged
moritz merged 31 commits from backupbot_revolution into main 2023-10-09 10:54:22 +00:00
Member
No description provided.
moritz added 12 commits 2023-09-07 13:42:29 +00:00
29bbd5dedd Backup volumes from host instead of copying paths
* Backupbot will now copy all volumes from a service with
  backupbot.enabled = 'true' label from the /var/lib/docker/volumes/
  path directly. This reduces the resource overhead of copying
  stuff from one volume to another.
  Recipes need to be adjustet that db-dumps are saved into a volume
  now!
* Remove the Dockerfile and move stuff into a entrypoint. This
  simplifies the whole versioning thing and makes this "just"
  a recipe

Co-authored-by: Moritz < moritz.m@local-it.org>
continuous-integration/drone/pr Build is failing Details
9dfdb61ba1
update README
moritz added this to the backupbot revolution project 2023-09-07 13:42:56 +00:00
moritz self-assigned this 2023-09-07 13:43:02 +00:00
moritz added 2 commits 2023-09-07 23:17:25 +00:00
continuous-integration/drone/pr Build is failing Details
55cbae63a8
add healthcheck
moritz added 1 commit 2023-09-07 23:30:58 +00:00
continuous-integration/drone/pr Build is failing Details
789cc7972b
specify program versions to prevent future breakage
moritz added 1 commit 2023-09-07 23:48:20 +00:00
continuous-integration/drone/pr Build is failing Details
77e8792949
fix entrypoint
decentral1se reviewed 2023-09-08 09:14:00 +00:00
decentral1se left a comment
Owner

First quick pass, looking great! Great work!

First quick pass, looking great! Great work!
README.md Outdated
@ -45,0 +80,4 @@
Add your `SSH_KEY` as docker secret:
```
abra app secret insert <app_name> ssh_key v1 """$(cat backupkey)
"""
Owner

Unwanted newline?

Unwanted newline?
Author
Member

Unfortunately this newline-hack is required, else the ssh-key is not accepted.

Unfortunately this newline-hack is required, else the ssh-key is not accepted.
moritz marked this conversation as resolved
moritz added 2 commits 2023-09-21 22:54:33 +00:00
moritz added 3 commits 2023-09-22 14:39:51 +00:00
moritz added 1 commit 2023-09-22 14:50:51 +00:00
continuous-integration/drone/pr Build is failing Details
e81131668f
formatting
moritz added 1 commit 2023-09-22 16:34:56 +00:00
continuous-integration/drone/pr Build is failing Details
c6276274c6
fix error messages
Owner

Will it break anything on our existing backup setups if we merge this? Is a migration path needed? @moritz

Will it break anything on our existing backup setups if we merge this? Is a migration path needed? @moritz
Owner

@moritz ran into this error while trying to set things up:

docker -c foo.com exec -it bbt.foo.com_app.1.h66skv7b40r7chqkhbrslt365 backup ls
File "/usr/bin/backup", line 106
if (app_name in apps and
^^^^^^^^^^^^^^^^^^^^
SyntaxError: cannot use assignment expressions with expression

Would it also be an idea to try and set up some tests for this while we're here? I can imagine we'll be changing the code as we go. Idk if you'd like to do that in Python or we could try something simple like the integration suite for abra (manually for the time being...).

@moritz ran into this error while trying to set things up: > docker -c foo.com exec -it bbt.foo.com_app.1.h66skv7b40r7chqkhbrslt365 backup ls > File "/usr/bin/backup", line 106 > if (app_name in apps and > ^^^^^^^^^^^^^^^^^^^^ > SyntaxError: cannot use assignment expressions with expression Would it also be an idea to try and set up some tests for this while we're here? I can imagine we'll be changing the code as we go. Idk if you'd like to do that in Python or we could try something simple like the integration suite for `abra` (manually for the time being...).
moritz added 1 commit 2023-10-03 16:19:54 +00:00
continuous-integration/drone/pr Build is failing Details
2fd0ac16bc
fix typo
Author
Member

@moritz ran into this error while trying to set things up:

docker -c foo.com exec -it bbt.foo.com_app.1.h66skv7b40r7chqkhbrslt365 backup ls
File "/usr/bin/backup", line 106
if (app_name in apps and
^^^^^^^^^^^^^^^^^^^^
SyntaxError: cannot use assignment expressions with expression

Would it also be an idea to try and set up some tests for this while we're here? I can imagine we'll be changing the code as we go. Idk if you'd like to do that in Python or we could try something simple like the integration suite for abra (manually for the time being...).

I broke it through some silly code formatting. Yeah some tests would prevent this.

> @moritz ran into this error while trying to set things up: > > > docker -c foo.com exec -it bbt.foo.com_app.1.h66skv7b40r7chqkhbrslt365 backup ls > > File "/usr/bin/backup", line 106 > > if (app_name in apps and > > ^^^^^^^^^^^^^^^^^^^^ > > SyntaxError: cannot use assignment expressions with expression > > Would it also be an idea to try and set up some tests for this while we're here? I can imagine we'll be changing the code as we go. Idk if you'd like to do that in Python or we could try something simple like the integration suite for `abra` (manually for the time being...). I broke it through some silly code formatting. Yeah some tests would prevent this.
moritz added 1 commit 2023-10-03 16:41:26 +00:00
continuous-integration/drone/pr Build is failing Details
a2aec9b59e
release note for migration
Author
Member

Will it break anything on our existing backup setups if we merge this? Is a migration path needed? @moritz

For migration the repository variables need to be merged, I pushed a release note: a2aec9b59e
This way the backup script is independent of the repository type.

> Will it break anything on our existing backup setups if we merge this? Is a migration path needed? @moritz For migration the repository variables need to be merged, I pushed a release note: https://git.coopcloud.tech/coop-cloud/backup-bot-two/commit/a2aec9b59e3a5ac3c91ed14d6551f8859274fb89 This way the backup script is independent of the repository type.
moritz added 1 commit 2023-10-03 20:04:37 +00:00
continuous-integration/drone/pr Build is failing Details
06724428d3
Prompt before restore
moritz added 1 commit 2023-10-03 21:45:32 +00:00
continuous-integration/drone/pr Build is failing Details
f6e062a9c3
restic_repo as secret option #31
Owner

@moritz any chance you could resolve the merge conflicts? Unsure I've got the right changeset resolving myself while testing / implementing the abra side of things. Thanks!

@moritz any chance you could resolve the merge conflicts? Unsure I've got the right changeset resolving myself while testing / implementing the `abra` side of things. Thanks!
Owner

Oh right, they're diverging 🤔

CONFLICT (content): Merge conflict in .env.sample
CONFLICT (modify/delete): backup.sh deleted in HEAD and modified in 83a3d82 (More HTTPS fixes). Version 83a3d82 (More HTTPS fixes) of backup.sh left in tree.

I think you need to undelete backup.sh for backwards compat while we're still transitioning?

Oh right, they're diverging 🤔 > CONFLICT (content): Merge conflict in .env.sample > CONFLICT (modify/delete): backup.sh deleted in HEAD and modified in 83a3d82 (More HTTPS fixes). Version 83a3d82 (More HTTPS fixes) of backup.sh left in tree. I think you need to undelete `backup.sh` for backwards compat while we're still transitioning?
moritz added 1 commit 2023-10-04 11:59:33 +00:00
continuous-integration/drone/pr Build is failing Details
d47ff6caac
remove package versions, to avoid conflicts
moritz added 1 commit 2023-10-04 15:12:53 +00:00
moritz added 1 commit 2023-10-04 16:48:14 +00:00
continuous-integration/drone/pr Build is failing Details
0cc9c3598d
fix secret name
Author
Member

Oh right, they're diverging 🤔

CONFLICT (content): Merge conflict in .env.sample
CONFLICT (modify/delete): backup.sh deleted in HEAD and modified in 83a3d82 (More HTTPS fixes). Version 83a3d82 (More HTTPS fixes) of backup.sh left in tree.

I think you need to undelete backup.sh for backwards compat while we're still transitioning?

Should the cronjob then also only run backup.sh? At the moment I don't see any issues for backwards compat apart the migration steps inside release/next. Maybe we shouldn't release the next version until it's not tested well.

> Oh right, they're diverging 🤔 > > > CONFLICT (content): Merge conflict in .env.sample > > CONFLICT (modify/delete): backup.sh deleted in HEAD and modified in 83a3d82 (More HTTPS fixes). Version 83a3d82 (More HTTPS fixes) of backup.sh left in tree. > > I think you need to undelete `backup.sh` for backwards compat while we're still transitioning? Should the cronjob then also only run backup.sh? At the moment I don't see any issues for backwards compat apart the migration steps inside `release/next`. Maybe we shouldn't release the next version until it's not tested well.
moritz force-pushed backupbot_revolution from 0cc9c3598d to bb1237f9ad 2023-10-04 17:08:58 +00:00 Compare
Author
Member

I rebased everything to resolve the merge confict

I rebased everything to resolve the merge confict
moritz added 1 commit 2023-10-04 17:11:51 +00:00
moritz added 1 commit 2023-10-09 10:53:32 +00:00
continuous-integration/drone/pr Build is failing Details
d25688f312
add backupbot label
moritz changed title from WIP: Backupbot Revolution to Backupbot Revolution 2023-10-09 10:53:33 +00:00
moritz merged commit 69e7f07978 into main 2023-10-09 10:54:22 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: coop-cloud/backup-bot-two#23
No description provided.