From 6e49d2b6c76bdc11c42fb292f7bdafc95e492d51 Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Thu, 11 Feb 2021 19:10:38 +0100 Subject: Revitalized the borg role --- README | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 README (limited to 'README') diff --git a/README b/README new file mode 100644 index 0000000..98d7b5b --- /dev/null +++ b/README @@ -0,0 +1,16 @@ +There are several variables you can define to configure a machines response to the borg role : +- is_borg_server: a boolean that indicates if a machine will act as a borg server +- borg_server: a string that contains a borg servers hostname +- borg_jobs: a list of dict, one item per job with the following keys: + - name: the name of the borg job + - path: an optional path containing the files to backup + - command_to_pipe: an optional command to pipe the backup data from + - pre_command: an optional command to run before a job + - post_command: an optional command to run after a job + +To be valid, a borg job entry needs to have exactly one of the path or command_to_pipe keys. + +Here are some job examples : +- { name: etc, path: "/etc" } +- { name: mysqldump, command_to_pipe: "/usr/bin/mysqldump -h {{ mysql_server }} -u{{ ansible_hostname }} -p{{ ansible_local.mysql_client.password }} --single-transaction --add-drop-database -B {{ ansible_hostname }}" } +- { name: gitea, path: "/tmp/gitea.zip", pre_command: "echo '/usr/local/sbin/gitea -C /etc/gitea -c /etc/gitea/app.ini dump -f /tmp/gitea.zip' | su -l _gitea", post_command: "rm -f /tmp/gitea.zip" } -- cgit v1.2.3