@@ -42,15 +42,17 @@ in MongoDB.
4242
4343## MongoDB backup script
4444
45- ` scripts/backup_mongodb.sh ` dumps a MongoDB database to a Dropbox-synced
46- folder. The script starts ` mongod ` if it is not running and stops it again
47- when the backup finishes (if it was started by the script).
45+ ` scripts/backup_mongodb.sh ` dumps a MongoDB database and creates a compressed
46+ ` db_backup_YYYY-MM-DD.tar.gz ` file in a Dropbox-synced folder. The script
47+ starts ` mongod ` if it is not running and stops it again when the backup
48+ finishes (if it was started by the script).
4849
4950Make it executable before scheduling it with ` cron ` :
5051
5152``` bash
5253chmod +x scripts/backup_mongodb.sh
5354```
55+
5456Store ` DBNAME ` (and optional credentials) in environment variables rather than
5557editing the script. You may create a file named ` ~/.mongodb_backup_env ` with
5658content like:
@@ -62,3 +64,24 @@ export DBNAME="fmriprep_stats"
6264```
6365
6466The backup script will source this file if present.
67+
68+ ## Weekly plot update script
69+
70+ ` scripts/update_plots.sh ` generates plots with ` src/run.py plot ` and pushes them
71+ to a clone of the ` nipreps.github.io ` website. The path to that clone can be
72+ given as an argument and defaults to ` $HOME/workspace/nipreps.github.io ` .
73+ The script may be run from any directory and validates that the target is a Git
74+ repository.
75+
76+ Make the script executable:
77+
78+ ``` bash
79+ chmod +x scripts/update_plots.sh
80+ ```
81+
82+ To run it every Monday at 5 AM, add this line to your crontab:
83+
84+ ```
85+ 0 5 * * 1 /path/to/fmriprep_stats/scripts/update_plots.sh >>/tmp/update_plots.log 2>&1
86+ ```
87+
0 commit comments