Backupbot Revolution #23

Merged
moritz merged 31 commits from backupbot_revolution into main 2023-10-09 10:54:22 +00:00
Owner
No description provided.
moritz added 12 commits 2023-09-07 13:42:29 +00:00
* 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>
update README
Some checks failed
continuous-integration/drone/pr Build is failing
9dfdb61ba1
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
add healthcheck
Some checks failed
continuous-integration/drone/pr Build is failing
55cbae63a8
moritz added 1 commit 2023-09-07 23:30:58 +00:00
specify program versions to prevent future breakage
Some checks failed
continuous-integration/drone/pr Build is failing
789cc7972b
moritz added 1 commit 2023-09-07 23:48:20 +00:00
fix entrypoint
Some checks failed
continuous-integration/drone/pr Build is failing
77e8792949
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
Owner

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
This reverts commit 2838a36d43f44f80aa76095863f463d6aae57403.
feat: Backup Secrets (copy secrets) #28
Some checks failed
continuous-integration/drone/pr Build is failing
ef9fbda7d0
moritz added 1 commit 2023-09-22 14:50:51 +00:00
formatting
Some checks failed
continuous-integration/drone/pr Build is failing
e81131668f
moritz added 1 commit 2023-09-22 16:34:56 +00:00
fix error messages
Some checks failed
continuous-integration/drone/pr Build is failing
c6276274c6
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
fix typo
Some checks failed
continuous-integration/drone/pr Build is failing
2fd0ac16bc
Author
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...).

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
release note for migration
Some checks failed
continuous-integration/drone/pr Build is failing
a2aec9b59e
Author
Owner

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
Prompt before restore
Some checks failed
continuous-integration/drone/pr Build is failing
06724428d3
moritz added 1 commit 2023-10-03 21:45:32 +00:00
restic_repo as secret option #31
Some checks failed
continuous-integration/drone/pr Build is failing
f6e062a9c3
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
remove package versions, to avoid conflicts
Some checks failed
continuous-integration/drone/pr Build is failing
d47ff6caac
moritz added 1 commit 2023-10-04 15:12:53 +00:00
extend download to download the secrets or all app volumes at once
Some checks failed
continuous-integration/drone/pr Build is failing
328adffdc1
moritz added 1 commit 2023-10-04 16:48:14 +00:00
fix secret name
Some checks failed
continuous-integration/drone/pr Build is failing
0cc9c3598d
Author
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?

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
Owner

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
rm unused compose.https.yml as its replaced with compose.secret.yml
Some checks failed
continuous-integration/drone/pr Build is failing
b3cbb8bb46
moritz added 1 commit 2023-10-09 10:53:32 +00:00
add backupbot label
Some checks failed
continuous-integration/drone/pr Build is failing
d25688f312
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
decentral1se moved this to Done in backupbot revolution on 2025-04-20 06:03:23 +00:00
decentral1se moved this to Done in backupbot revolution on 2025-04-20 06:03:25 +00:00
Sign in to join this conversation.
No description provided.