* 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
* Split code into multiple files
* Deduplicate logic for pruning backups against different storages
* Only parse templates when notifications are enabled
* Use better description
* Add test case for notification feature
* Fix template data
* bash is needed to interpret test
* Do not use bashisms in test
* Only print FullPath
* Fix assertion
Edited the "Restoring a volume from a backup" section example to be able to better differentiate between the names of the temporary restore container and the name of the mounted restore volume.
New example container name: temp_restore_container
The restore volume name remains the same: backup_restore
Also changed "one-off container" to "once-off container".
* 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>
* 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>
Previously, symlinks would be included in the set of candidates, but would
be skipped when pruning. This could lead to a wrong number of candidates
being printed in the log messages.