From 7092bfee2ed048db4157651451da5b0ded9d59c1 Mon Sep 17 00:00:00 2001 From: Asif Bacchus Date: Sat, 20 Jul 2019 19:56:29 -0600 Subject: [PATCH] --- 04.-Include%2FExclude-files.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 04.-Include%2FExclude-files.md diff --git a/04.-Include%2FExclude-files.md b/04.-Include%2FExclude-files.md new file mode 100644 index 0000000..842428d --- /dev/null +++ b/04.-Include%2FExclude-files.md @@ -0,0 +1,16 @@ +# include additional files +There are many instances where backing up system configuration files is very helpful instead of just your Seafile-related files. This is especially true in bare-metal setups where likely the entire machine is dedicated to hosting Seafile. Ideal candidates for inclusion are files like your *fstab*, networking configuration, program configs for other accessory programs like email notifiers, *fail2ban*, etc. + +## *xtraLocations.borg* +This is a plain-text file listing paths to directories/files you want to include in your backup. Simply open this file in a text-editor, read the comments and add/update paths as desired. I've included some common files and directories for you like *ssh* configurations, etc. If there are any files listed in this file that do not exist on your system, you might want to remove them to prevent borg throwing *warnings* and polluting your logfile. Note, however, that *warnings* will not stop the script from running, so this is pretty cosmetic. + +You can add files by specifying a full path to them. You can select entire directories by doing the same but should include the trailing slash for consistency and to remind you that it's a directory. You can also use wildcards are normal in this file. + +## *excludeLocations.borg* +This is a plain-text file listing paths and files you wish to **exclude** from your backup. Entries here override those in *xtraLocations.borg*. Please note that there is a specific format required in this file unlike the standard 'shell' format used by *xtraLocations.borg*. This is something imposed by borgbackup so please consult their help for more details. Specifically, run the following for help constructing exclusion patterns: + +```bash +borg help patterns +``` + +In most cases, you can still get away with standard 'shell' format, but there are certain cases where that will not work. I've pre-populated this file with some common examples but, you might want to edit that to suit your tastes. Specifically, you may *not* want to to exclude your thumbnails if you have lots of pictures and don't want to spend time regenerating them after a restore. I chose to exclude them since storage space does cost money.