websauna.system.devop.backup module

Duplicity based backuping.

websauna.system.devop.backup.backup_site()[source]

Run the site backup script.

Runs the configured backup script websauna.backup_script. The backup script can be any UNIX executable. The script gets the environment variables from websauna configuration, as exposed by websauna.utils.exportenv.create_settings_env().

In the case the backup script fails, an exception is raised and logged through normal application logging means.

Run backup from the command line:

echo "from websauna.system.devop import backup ; backup.backup_site()" | pyramid-web20-shell development.ini

Note that the output is buffered, so there might not be instant feedback.