From 2f7a34db20972f4f9fc5f5bbcee9bed39a872456 Mon Sep 17 00:00:00 2001 From: Petru Paler Date: Wed, 24 Jan 2024 15:18:49 +0000 Subject: [PATCH] cronjob to sync syncthing wordpress to glusterfs --- services/wordpress-backup.hcl | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 services/wordpress-backup.hcl diff --git a/services/wordpress-backup.hcl b/services/wordpress-backup.hcl new file mode 100644 index 0000000..138a5ed --- /dev/null +++ b/services/wordpress-backup.hcl @@ -0,0 +1,30 @@ +job "wordpress-backup" { + datacenters = ["alo"] + type = "batch" + + periodic { + cron = "*/5 * * * * *" + prohibit_overlap = true + } + + group "cron" { + task "rsync" { + driver = "raw_exec" + + config { + command = "/bin/sh" + args = [ "local/script.sh" ] + } + + template { + destination = "local/script.sh" + data = <