However, it is perfectly ok to set up 2 or more daily backups while Theatre Manager is running. You may wish to do this on a high volume site and pick times like 8:00am, 1:30pm and 8:00pm, for example. Backups can run while Theatre Manager is being used.
You can also do a manual backup at any time by going into Terminal and running the 'backupTM.php' file mentioned in this section, even if Theatre Manager is running. You would do this using terminal on the server by typing
php /Users/Shared/backupTM.php
based on what you had already done to configure the script using the instructions below.
This backup process only exports data from the database and creates a compressed backup file. You will need to take those backups and copy them to another machine and/or establish a backup rotation and take some offsite.
| 1. | If you used the installer to place files into the correct location, you can skip to Step 2 in this section. If you did not, then you will need a copy of the backup script files and then:
|
| 2. | If the files are in the correct place because they were installed by the installer, then we will need to edit the backupTM.php file. Note, if you have multiple databases to backup, make a copy of this file for each database you want to backup and edit accordingly.
|
| 1. | ![]() Test the batch file by starting up terminal and typing the highlighted command
|
| 1. | Create a timed backup for the database by going to the /applications directory and starting a program called CronniX. A copy was installed by the PostGres Setup program. CronniX is shareware and can be found at www.abstracture.de/projects-en/cronnix
Only do this on the machine that has the database server on it and make sure you are logged on as the administrator. |
| 2. | Double click on the 'CronniX.app' icon (it may or may not have .app at the end). This will start the CronniX task Scheduler. On a side note, Cronnix is an interface to the Unix CRON facility. CRON has been around for a long time and is one of the task scheduling tools that is built into the unix operating system. You don't have to worry if it is on your system.... it just is.
Click the New icon on the upper left. It will open a new window with a sample script at the bottom that says: echo "Happy New Year!" Replace this with the same command used to start a backup in the preceding section. php /Users/Shared/backupTM.php Click on the expert tab and make the settings in the upper half of the screen as per the example. These settings adjust your backup schedule. For example if you want a daily 2am and 2pm backup:
This will effectively schedule two per day backup of your database and is the recommended backup schedule to setup. Entries for any of the items can be like:
Note: you can schedule backupTM to run as many times as you want during the day by changing the parameters of the one CRON job, or by creating more jobs. Once or twice per day is normally enough but you may feel that more times is better for your backup requirements on busy days. |