WIP: Backup volumes from /var/lib/docker/volumes instead of copying individual paths #16
Closed
yksflip
wants to merge 4 commits from
backup_volumes into main
pull from: backup_volumes
merge into: :main
:main
:renovate/docker-29.x
:feature/makeDeleteDefault
:restic-exporter
:cmd-setup-restic-s3
:prom-mon
:feature/dockerfile
:bb2-classic
:feature/selective_paths
:list
:enable-label
:backupbot_revolution
:backup_volumes
:multi_path
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
backupbot revolution
Done
Assignees
3wordchant
aadil (Aadil Ayub)
abra-bot (Abra Bot)
ammaratef45
amras (Sarma)
Apfelwurm
appletalk
arjan
basebuilder
BornDeleuze
Brooke
carla
cas (Cassowary)
codegod100
coopcloud
cyrnel
decentral1se (d1)
dede
devydave
fauno (fauno)
flancian
Frando
iexos
jade (Jade Ambrose)
javielico (Javielico)
jjsfunhouse
jmakdah2 (Jackie Makdah)
joe-irving (Joe Irving)
kawaiipunk (KawaiiPunk)
knoflook
kolaente
lambdabundesverband
linnealovespie (April)
marlon (marlon)
mayel
mirsal
moosemower
moritz
nicksellen (Nick Sellen)
notplants
oxaliq (sorrel)
p4u1
pau
pharaohgraphy (Andrew 🐦🔥❤️🔥✴️)
PhiNatalie
renovate-bot (Comrade Renovate Bot)
ripclap
rix
rscmbbng
sef (sef)
simon
sixsmith (Sixsmith)
stevensting
tobias
trav (Trav Fryer)
val (val (he/him))
vaznasty
virtualboys
wolcen (Chris Thompson)
wykwit
xynosis
yksflip
Clear assignees
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: coop-cloud/backup-bot-two#16
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
So we realized that copying several hundred gigabytes of data just for backup purpose
is a lot for our infrastructure. This is why we wanted to get rid of the
docker cpstuff.We investigated the current use of backupbot in all recipes and there are actually more or
less two use-cases:
So we thought we could reduce complexity by backing up the /var/lib/docker/volumes/
path instead. Backupbot will still look for a
backupbot.backup = 'true'label,and select all volumes with prefixed with the stack_name (involves bash globbing magic).
We considered running
docker run -v ...:...for every service too, but decided that justcopying from the host filesystem is much simpler and comes with no other costs (we could see now).
Secondly we removed the Dockerfile as it does only very few things. For now it's just
simpler to have bash, jq etc. installed in the entrypoint. We don't have to build a image,
no more frankenstein-repo, versioning just like any other recipe ...
Before releasing a new version of this, we'd have to adjust all Recipes including backupbot, to:
/var/lib/postgresql/data/).pathslabelseda232819cto24d2c0e85b@@ -7,3 +6,3 @@volumes:- "/var/run/docker.sock:/var/run/docker.sock"- "backups:/backups"- "/var/lib/docker/volumes/:/var/lib/docker/volumes/"Mounting the volumes read-only could prevent any kind of unexpected modifications:
"/var/lib/docker/volumes/:/var/lib/docker/volumes/:ro"Sorry folks, I'm not deep enough into using
backup-bot-twoto grok much of this. I think @3wordchant and autonomicz will have more context to help review this. Cool to see the approach adapting to larger scale.I just realised, we'll still need the
.paths labelsforabra app backupfunctionality or have to alter abra so, to just backup volumes too ...Ah yes. That explains my weird hesitation about this otherwise-great change 🤔
TBH the
abra backupfunctionality as it currently stands is bad for a lot of cases, once there's more than a trivial amount of data, copying usingdocker cpis very painful because of lack of compression (see #324).The Heroku CLI -- which was the inspiration for a lot of the initial
abrafunctionality -- does backups server-side. Running non-Docker stuff on the remote server would be a reasonably significant design change, but maybe now's the time? Perhaps we can discuss in "Co-op Cloud Tech", or on a call soon?I'd still count this approach as docker-stuff, but it's vague :D
Yes let's have a chat/call!
regarding this, I thought to just keep the .pats labels in the recipes, but point everything to a volume folder ... So we can have both for the moment, until we find a better solution.
Moved to https://git.coopcloud.tech/coop-cloud/backup-bot-two/src/branch/backupbot_revolution
Pull request closed