Backups of the Startkladde MySQL Database

Backups of the Startkladde MySQL database can be performed with the bash script startkladde_backup.bsh

Functionality

The script uses the program mysqldump to create MySQL scripts of all tables and stores them in a file called <date>_<db>_backup.tgz, where

  • <date> is the current date in format YYYYmmdd_HHMMSS
  • <db> is the name of the MySQL database, which has been backuped

Synopsis

startkladde_backup.bsh <dir>

The following command line options are accepted:

dir

<dir> is the directory, where the output archives containing the backup are stored. Defaults to the current working directory.

The following envirionment variables, which may be defined inside the script, control the behaviour of the program:

USER <username>

username of MySQL user performing the backup. Defaults to backup

PASS <password>

Password for USER. Defaults to sk.

DBNAME <database>

Name of the database to backup. Defaults to startkladde