aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md50
1 files changed, 48 insertions, 2 deletions
diff --git a/README.md b/README.md
index e75c0fb..90b1ae1 100644
--- a/README.md
+++ b/README.md
@@ -2,7 +2,9 @@
## About
This collection of services, timers and scripts enables a precise - gpg encrypted - backup of certain configuration data.
-System-wide and user-specific backups are possible.
+System-wide and user-specific backups are possible.
+Crypted-backups by default uses volatile file-systems (*tmpfs*) as a working space.
+**Note:** *Depending on the size of your (singular) backups and available RAM you might want to consider moving this working space somewhere else.*
## Features
Backups of the following program settings/profiles/folders are possible:
@@ -20,9 +22,13 @@ Backups of the following program settings/profiles/folders are possible:
* firefox
* thunderbird
-## Requirements
+### Compression
At the moment crypted-backups only supports [xz](http://tukaani.org/xz/) compression.
+## Requirements
+* xz
+* gnupg
+
## Configuration
Two forms of configuration files are used: One for system-wide services and one for user services.
Both are documented and show examples on how to setup the variables.
@@ -34,6 +40,46 @@ The configuration file for system services can be found in **/etc/crypted-backup
The configuration file for user services is read first from **$HOME/.crypted-backups** followed by **$HOME/.config/crypted-backups**. Environment variables set in the first file will be replaced by the ones set in the latter, if present.
Make sure to copy and modify a plain one from your system skeleton folder (**/etc/skel/.crypted-backups**).
+## Usage
+Crypted-backups is made available through systemd services and timers.
+### Example 1: Activating a system backup with the help of a timer
+In this example the system backup for the bitlbee configuration will be started by a timer.
+This timer unit has the same name as its service.
+ /usr/lib/systemd/system/backup-bitlbee.service
+ /usr/lib/systemd/system/backup-bitlbee.timer
+Using *systemctl* one can easily start and stop timer units belonging to a service. As root:
+ systemctl start backup-bitlbee.timer
+ systemctl stop backup-bitlbee.timer
+To make the system boot with this timer started, enable it. Again, as root:
+ systemctl enable backup-bitlbee.timer
+ systemctl disable backup-bitlbee.timer
+When the timer's conditions are met, the service *backup-bitlbee.service* is started automatically. Much like cron.
+Unlike cron, you can also start and stop the service separately:
+ systemctl start backup-bitlbee.service
+ systemctl stop backup-bitlbee.service
+
+**Note:** *Due to systemd's architecture you can copy/paste and modify the given timer from **/usr/lib/systemd/system/** and put it to **/etc/systemd/system**. The latter will always have precedence over the former. Same counts for services!*
+
+### Example 2: Activating a user backup with the help of a timer
+In this example the user backup for a user's firefox profile will be started by a timer (like in the example above).
+The user service and timer units reside in a different location:
+ /usr/lib/systemd/user/backup-firefox.service
+ /usr/lib/systemd/user/backup-firefox.timer
+Using *systemctl* one can easily start and stop timer units belonging to a service. This time, as your user:
+ systemctl --user start backup-firefox.timer
+ systemctl --user stop backup-firefox.timer
+To make your user environment start with this timer started, enable it. Again, as your user:
+ systemctl --user enable backup-firefox.timer
+ systemctl --user disable backup-firefox.timer
+
+When the timer's conditions are met, the service *backup-firefox.service* is started (as your user) automatically.
+This service can of course also just be started and stopped separately from the timer:
+ systemctl --user start backup-firefox.service
+ systemctl --user stop backup-firefox.service
+
+**Note:** *Due to systemd's architecture you can copy/paste and modify the given timer from **/usr/lib/systemd/user/** and put it to **/etc/systemd/user**. The latter will always have precedence over the former. Same counts for services!*
+**Note:** *To minimize the size of your backups, you might want to consider using tools like [profile-cleaner](https://github.com/graysky2/profile-cleaner) to shrink the size of your program profiles.*
+
## TODO
* Using [pixz](https://github.com/vasi/pixz)
* Using [rsync](https://rsync.samba.org/) for backup mirroring