backup multiple paths #5

Merged
3wordchant merged 4 commits from multi_path into main 2021-12-14 14:44:06 +00:00
Owner

still a wip because I'm still trying to understand the docker cp behaviour.


okay got my head around it:
docker cp has different behaviour if the DEST path already exists and there is a /. or / in the end. see docs

When we only create the parent folder, docker cp will always create the DEST path and we don't have to expect the right format in the label.

/var/www/html/data/ -> /backups/local-cloud/var/www/html/data/

still a wip because I'm still trying to understand the `docker cp` behaviour. ----- okay got my head around it: `docker cp` has different behaviour if the DEST path already exists and there is a `/.` or `/` in the end. see [docs](https://docs.docker.com/engine/reference/commandline/cp/#extended-description) When we only create the parent folder, `docker cp` will always create the DEST path and we don't have to expect the right format in the label. /var/www/html/data/ -> /backups/local-cloud/var/www/html/data/
yksflip added 1 commit 2021-11-23 16:46:45 +00:00
continuous-integration/drone/pr Build is passing Details
f2472bd0d3
make backup.path comma separated list
yksflip added 1 commit 2021-11-24 10:17:30 +00:00
continuous-integration/drone/pr Build is passing Details
ce42fb06fd
fix docker cp paths
yksflip changed title from WIP: backup multiple paths to backup multiple paths 2021-11-24 10:17:47 +00:00
yksflip added 1 commit 2021-11-24 10:29:28 +00:00
continuous-integration/drone/pr Build is passing Details
5a20ef4349
Merge branch 'main' into multi_path
yksflip added 1 commit 2021-12-13 10:38:14 +00:00
continuous-integration/drone/pr Build is passing Details
d6faffcbbd
move rm up, to keep the latest backup in the volume
3wordchant approved these changes 2021-12-14 14:43:59 +00:00
3wordchant left a comment
Owner

Looking great! Thank you!

Looking great! Thank you!
@ -72,6 +72,8 @@ else
fi
if [[ \ $*\ != *\ --skip-backup\ * ]]; then
rm -rf "${backup_path}"
Owner

Wondering if we can add a config option for this, but fine for the moment.

Wondering if we can add a config option for this, but fine for the moment.
First-time contributor

agree! I added this because I realized that the backupbots volume could potentially grow for ever in my usecase, as the copy doesn't delete any files that don't exist anymore. But for other usecases it might be good to disable it.

agree! I added this because I realized that the backupbots volume could potentially grow for ever in my usecase, as the copy doesn't delete any files that don't exist anymore. But for other usecases it might be good to disable it.
@ -83,3 +85,3 @@
if [ "$path" = "null" ]; then
echo "ERROR: missing 'path' for $service"
continue # or maybe exit?
continue # or maybe exit?
Owner

This was deliberate, but I guess there isn't much of a bash coding standard. Closest I could find is some random person on stackoverflow who agrees with me 🙃 https://stackoverflow.com/a/1496301/14269772

This was deliberate, but I guess there isn't much of a bash coding standard. Closest I could find is some random person on stackoverflow who agrees with me 🙃 https://stackoverflow.com/a/1496301/14269772
First-time contributor

oh, I didn't intend to start a argument on coding style. I'll blame my opionated autoformatter for this one :D I'm totally fine having two spaces

oh, I didn't intend to start a argument on coding style. I'll blame my opionated autoformatter for this one :D I'm totally fine having two spaces
Owner

i'll happily defer to comrade auto-formatter, great way to finish any arguments 😁

i'll happily defer to comrade auto-formatter, great way to finish any arguments 😁
3wordchant merged commit 940b6bde1a into main 2021-12-14 14:44:06 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
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#5
No description provided.