From 131420be1703448a659b39eb1d6e33b6c3454530 Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Sun, 20 May 2018 12:51:02 +0300 Subject: [PATCH] roles/common: Add task to copy tarsnaprc One less thing to do manually after server provisioning, and there is nothing sensitive in here anyways. --- roles/common/files/tarsnaprc | 47 ++++++++++++++++++++++++++++++++++ roles/common/tasks/tarsnap.yml | 3 +++ 2 files changed, 50 insertions(+) create mode 100644 roles/common/files/tarsnaprc diff --git a/roles/common/files/tarsnaprc b/roles/common/files/tarsnaprc new file mode 100644 index 0000000..c441533 --- /dev/null +++ b/roles/common/files/tarsnaprc @@ -0,0 +1,47 @@ +### Recommended options + +# Tarsnap cache directory +cachedir /root/.tarsnap-cache + +# Tarsnap key file +keyfile /root/.tarsnap.key + +# Don't archive files which have the nodump flag set +nodump + +# Print statistics when creating or deleting archives +print-stats + +# Create a checkpoint once per GB of uploaded data. +checkpoint-bytes 1G + +### Other options, not applicable to most systems + +# Aggressive network behaviour: Use multiple TCP connections when +# writing archives. Use of this option is recommended only in +# cases where TCP congestion control is known to be the limiting +# factor in upload performance. +#aggressive-networking + +# Exclude files and directories matching specified patterns +#exclude + +# Include only files and directories matching specified patterns +#include + +# Attempt to reduce tarsnap memory consumption. This option +# will slow down the process of creating archives, but may help +# on systems where the average size of files being backed up is +# less than 1 MB. +#lowmem + +# Try even harder to reduce tarsnap memory consumption. This can +# significantly slow down tarsnap, but reduces its memory usage +# by an additional factor of 2 beyond what the lowmem option does. +#verylowmem + +# Snapshot time. Use this option if you are backing up files +# from a filesystem snapshot rather than from a "live" filesystem. +#snaptime + +humanize-numbers diff --git a/roles/common/tasks/tarsnap.yml b/roles/common/tasks/tarsnap.yml index 04b449a..7bb539f 100644 --- a/roles/common/tasks/tarsnap.yml +++ b/roles/common/tasks/tarsnap.yml @@ -9,4 +9,7 @@ - name: Install tarsnap apt: pkg=tarsnap update_cache=yes +- name: Copy tarsnaprc + copy: src=tarsnaprc dest=/root/.tarsnaprc owner=root group=root mode=0600 + # vim: set sw=2 ts=2: