Commit Graph

27 Commits

Author SHA1 Message Date
3e17d1b123
Ensure end time is recorded for unsuccessful runs too (#62)
* Ensure end time is also recorded for unsuccessful runs

* Clean up integration tests
2022-02-13 09:41:36 +01:00
e6af6efd8a
Add test setup for notification feature (#61)
* 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
2022-02-12 20:28:38 +01:00
Mauro Molin
8dfdd14527
Added custom notification messages using text/template (#60)
* Added custom notification messages using text/template

* Change notification template path and removed automatic newline trim

* Added stats and changed structure of template params

* Stat file hotfix

* Embedded and fixed default notification templates


Fix

* Changed Output to LogOutput

* Changed stats integer to unsigned

* Bytes formatting in template func


fix

* Changed Archives to Storages

* Removed unecessary sleep for pruning leeway

* Set EndTime after pruning is completed

* Added custom notifications documentation

* Added 5s sleep in swarm test

* Fixed documentation

* Dockerfile copies all files in cmd/backup
2022-02-11 20:05:16 +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
c062710ce8
Allow for env substitution in backup filename (#39) 2021-12-22 14:39:46 +01:00
3c06bf8102 run cli test using BACKUP_FROM_SNAPSHOT 2021-11-08 08:44:59 +01:00
c59b40f2df automatically create symlink to latest local backup if configured 2021-10-01 18:19:24 +02:00
184b7a1e18 add docs on one off backups using docker cli 2021-09-11 11:21:48 +02:00
5922820ada add test for checking behavior on symlinks 2021-09-04 10:30:34 +02:00
e0c4adc563 move handling of config to script layer 2021-08-24 09:01:44 +02:00
f4f4fa9e74 use full filepath when pruning local backups 2021-08-23 14:56:04 +02:00
f2739b583e add gpg encryption 2021-08-23 14:48:32 +02:00
78e4e3813b implement deletion of local backups 2021-08-23 14:48:10 +02:00
6fe81cdf2d add testcase for gpg encryption 2021-08-23 14:42:50 +02:00
278df9b2f7 use find instead of mc for pruning local backups 2021-08-20 10:01:46 +02:00
767c21ef65 allow local storage of backups 2021-08-19 10:35:39 +02:00
5fd6f66324 label container in cli test 2021-07-11 20:21:17 +02:00
da75d232f4 add test for using docker cli 2021-07-11 14:02:05 +02:00
8a385d22aa sleep longer before trying to backup 2021-07-11 10:39:39 +02:00
c01555f052 check for correct file in tests 2021-07-11 10:30:16 +02:00
d29d0d7399 check for correct file in tests 2021-07-11 10:26:35 +02:00
a91353742d add test for interacting with a swarm stack 2021-07-11 10:21:47 +02:00
44d65c1a67 assert that all containers are back up and running after backup 2021-07-09 09:57:05 +02:00
88d4326e61 define cron schedule that never runs 2021-07-09 09:50:59 +02:00
6d3e43680c add basic integration test 2021-07-09 09:47:07 +02:00
6ce197696a scaffold basic testing in CI 2021-07-09 08:15:27 +02:00