Commit Graph

25 Commits

Author SHA1 Message Date
8c8a2fa088
Update vulnerable containerd dependency (#104) 2022-06-07 09:21:40 +02:00
a654097e59
Update webdav client library (#97) 2022-04-20 10:56:26 +02:00
9bc8db0f7c
Build using Go 1.18 (#86) 2022-03-17 11:22:41 +01:00
b8f71b04a1
Use errgroup for running commands in parallel (#83) 2022-03-10 11:09:39 +01:00
0504a92a1f
Add option to run pre/post commands for any container (#73)
* Add option to run pre commands on arbitrary container

* Correctly handle quoted args in commands

* Provide defaults for test version arg

* Allow filtering of target containers

* Add documentation on exec commands

* Use mysqldump in exec test

* Add mysqldump section to recipes

* Also run commands test in swarm mode

* Use name instead of id

* Add syntax highlighting

* Add missing license headers
2022-02-22 07:53:33 +01:00
3ded77448c
Do not skip directories when creating tar archive (#72)
* Update targz library to include potential ownership fix

* Move archive logic to main repo

* Remove assertions for debugging

* Use relative path in assertion

* Strip local part from archive location

* Log when extracting in tests

* Fix trimming of prfix

* Add license info to archive.go file

* Undo change in test assertion

* Add test checking for preserved file ownership

* use same postgres version in tests

* Wrap errors when archiving, handle deletion at script layer
2022-02-22 07:49:24 +01:00
a57e93d01e
Split source into multiple files, deduplicate pruning logic, do not parse templates when notifications are not used (#63)
* Split code into multiple files

* Deduplicate logic for pruning backups against different storages

* Only parse templates when notifications are enabled

* Use better description
2022-02-13 10:52:19 +01:00
3bb99a7117 Update package targz 2022-02-08 15:12:46 +01:00
Kaerbr
6ded00aa06
Support Nextcloud / WebDav (#48)
* add studio-b12/gowebdav to be able to upload to webdav server

* make sure all env variables are present for webdav upload

* implement file upload to WebDav server

directory defaults to the base directory

* docs: add the new feature to the documentation

* if no WebDav env variable are given throw no error

* docs: use more elegant english :D

Co-authored-by: Frederik Ring <frederik.ring@gmail.com>

* docs: use official spelling of "WebDAV"

* perf: golang likes to return early instead of having an else block

* use WEBDAV_PATH instead of WEBDAV_DIRECTORY

* use split_words for more convenience

like shown here: https://github.com/kelseyhightower/envconfig#struct-tag-support

* simplify

* feat: add pruning of files in WebDAV remote

Based on / Inspired by the minio/S3 implementation of pruning remote files.

* remove logging from the development

* test: first try implementing tests

Sandly I have to use the remote pipeline -- local wont work for me.

* test: adapt used volume names

* test: specify image only once!

* test: minio AND webdav data should be present

* test: backups on WebDAV remote are laying in the root directory

* test: the webdav server stores date in /var/lib/dav

* trying with data subfolder

* test: 1 container was added so the number raised from 3 to 4

* webdav  subfolder is "data" not "backup"

* fix: password AND username must be defined

not password OR username

* improve logging

* feat: if the given path on the server isnt preset it will be created

* test: add creation of new folder for webdav to tests

Co-authored-by: Frederik Ring <frederik.ring@gmail.com>
2022-01-22 13:29:21 +01:00
1f9582df51
Fix handling of empty directories (#44)
* Add test checking whether empty directories are included in backups

* Update targz library to include fix
2021-12-29 10:10:12 +01:00
08d78a0bd6 allow sending notifications to multiple channels 2021-12-18 10:31:12 +01:00
5a6ce81b58 update github.com/otai/copy, use PreserveOwner option 2021-11-29 08:40:55 +01:00
dfd0d617e4 install bugfix releases where available 2021-11-28 20:12:23 +01:00
schwannden
411c39ee72
create a snapshot before creating tar archive (#32)
* create a snapshot before creating tar archive

* safeguard snapshot removal and make snapshot optional

* fix typo, make sure remove snapshot failure triggers failure hook

Co-authored-by: Schwannden Kuo <schwannden@mobagel.com>
2021-11-08 08:39:18 +01:00
88368197c1 implement email notifications on failed backup runs 2021-09-09 09:00:23 +02:00
fefc34c6aa tidy go mod file 2021-09-04 15:54:09 +02:00
5922820ada add test for checking behavior on symlinks 2021-09-04 10:30:34 +02:00
8aba98c012 use forked version of package targz 2021-09-04 10:08:06 +02:00
e0c4adc563 move handling of config to script layer 2021-08-24 09:01:44 +02:00
2469597848 fix lockfile mechanism 2021-08-23 18:46:49 +02:00
4c80494433 use go native strftime version 2021-08-23 14:48:33 +02:00
435583168b add logging 2021-08-23 14:48:33 +02:00
f2739b583e add gpg encryption 2021-08-23 14:48:32 +02:00
0c6ac05789 implement copy to remote storage 2021-08-23 14:47:34 +02:00
efb52aa806 try porting docker related parts to golang 2021-08-23 14:47:34 +02:00