|
2 years ago | |
---|---|---|
bin | 2 years ago | |
modules | 2 years ago | |
src | 2 years ago | |
.gitignore | 2 years ago | |
README.md | 2 years ago | |
bundle.conf.dist | 2 years ago | |
composer.json | 2 years ago | |
safespace.conf.dist | 2 years ago |
README.md
SafeSpace: A Safe Space for your data
_____ __ _____
/ ____| / _| / ____|
| (___ __ _| |_ ___| (___ _ __ __ _ ___ ___
\___ \ / _` | _/ _ \\___ \| '_ \ / _` |/ __/ _ \
____) | (_| | || __/____) | |_) | (_| | (_| __/
|_____/ \__,_|_| \___|_____/| .__/ \__,_|\___\___|
|_|
Keeping your data safe from binary opression since 2020
Basic usage
SafeSpace uses a configuration file to find the relevant configuration files.
You therefore need to point it to the correct file, or place it in the expected
directory. The recommended coarse is to install safespace into /opt/safespace
and drop the configuration in as /opt/safespace/safespace.conf
. If you want
to specify a custom file, use it with the envvar SAFESPACE_CONFIG
.
In the safespace.conf
of your choice, define the directories to scan. You can
scan directories to any depth, and specify a custom pool for each directory.
Installation
Download a dist zip. Unpack the zip archive and install into /opt/safespace:
$ unzip -d safespace safespace-x.x.x.zip
$ mv safespace /opt/
Create symbolic link
$ ln -s /opt/safespace/safespace /usr/bin/safespace
Tweak the configuration
$ cd /opt/safespace
$ cp safespace.conf.dist safespace.conf
$ nano safespace.conf
Make sure your pools are created and writable by the user running the backup.
Configure a bundle
Use the generate command to generate a configuration template for the project.
$ safespace generate
By default the config will be written to the terminal. Run again with --save
to write it to disk. You can now tweak it to suit your needs. You can also
use the --bundle
option to specify a bundle name. By default the name of the
current directory will be used.
$ safespace generate --save --bundle my-project
$ nano safespace.conf
Using modules
To find the available modules, use the module
command:
$ safespace module
To get more information on how to use a module, append its name to the command line:
$ safespace module pool.fs
Spinning the cogs
To review the config use the show
command. It will scan the configured
directories, load the bundles, and list the parsed jobs.
$ safespace show
If everything looks okay, use the backup
command to execute the applicable
jobs into a new snapshot. Add some v:s to the command to get verbose output
to see what is going on.
$ safespace backup -vvv
You can also create a snapshot with the snapshot
command, because why not:
$ safespace snapshot --create
To determine the latest version of jobs available in the snapshots, use the
find
command. You can specify a bundle and/or a job name to match.
$ safespace find
$ safespace find my-project
$ safespace find my-project/database
$ safespace find '*/database'
To create a zip-file of all snapshots at a specific point in time, use the
export
command:
$ safespace export --zip backup.zip --when "now"
$ safespace export --zip backup.zip --when "first day of month"
$ safespace export --zip backup.zip --when "2020-08-01"