Making a snapshot of a Lino databaseΒΆ

Every Lino project directory created with getlino startsite contains a file named

This script makes a snapshot of this Lino site, i.e. an archive file which contains the current state of a Lino database, including:

  • a Python dump made with dump2py

  • a file requirements.txt containing the output of pip freeze

  • other local files (configuration, local fixtures, uploads, etc.)

  • and possibly a mysqldump

The snapshot file is named If a file already existed before (probably from a previous run), then the script renames that file based on its time stamp and moves it to an archive directory before creating a new file.

If that archive directory contains any snapshots older than 60 days, the script removes them. This is important because usually also runs as a daily cron job. If we didn't take care of removing old snapshots, our server might run out of disk space some time in a far future when we long have forgotten that your daily job is adding a new file every day.