Skip to content

Commit

Permalink
Add backup crontab.
Browse files Browse the repository at this point in the history
  • Loading branch information
nosmo committed Jan 4, 2021
1 parent cc202ac commit 8399da9
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,30 @@ configured (deliberately). Once the service has been started and made
accessible, Baikal's own administration interface handles
authentication and permissions.

Deployment
Deployment
------

Configure the domain for your server by changing the HOSTNAME variable
in the `Dockerfile`. This is the only configuration required outside
of the web interface.
of the web interface.

To build and run the container, simply run `make`. To run an already
built instance and skip building, run `make run`.

This install deliberately avoids setting up HTTPS. The service that
this container runs exposes the service on port 8080 by default with
the assumption that it will be reverse proxied to by another
webservice with TLS configured. An example apache configuration is
server with TLS configured. An example apache configuration is
provided in the `examples` directory.

Storage
-----

Volatile storage containing the admin configuration and the sqlite
database is mounted from the `/storage` directory. These files are
sensitive and should be protected appropriately.
sensitive and should be protected appropriately.

Backup
-----
A very simple backup script suitable for dropping into
/etc/cron.weekly or similar can be found in `baikal-backup.cron`.
9 changes: 9 additions & 0 deletions baikal-backup.cron
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
BAIKAL_DIR=/home/user/docker-baikal
BACKUP_DIR=/home/user/backups/
NOW=$(date +%s)

if test -d $BACKUP_DIR ; then

cp ${BAIKAL_DIR}/storage/db/db.sqlite ${BACKUP_DIR}/baikal.sqlite.${NOW}

fi

0 comments on commit 8399da9

Please sign in to comment.