The network version of TaxCalc uses the Postgres database engine. Backups need to be made on the server itself - there is no capability for users to make an automatic backup of the database from a 'client' computer.
In a full blown server environment it may not be possible or desirable for users to have access to the server in order to make a backup of the database. In such cases, an automatic backup process is desirable.
The following information will help a system admin create a process that allows you to make an automatic backup of the TaxCalc database.
PLEASE NOTE: This needs to be run from the server where Postgres is installed. You will need to know the root database password (set when TaxCalc was configured).
Changes will need to be made to the file to suit your own environment. This example backs up to a folder called z:\share\taxcalcbackups. The .bat file is called tcbackups.bat and is stored in the z:\share folder. Modify this for your own environment. TaxCalc takes no responsibility for a failure to take adequate backups of your own data.
IMPORTANT: This article assumes the port used is 5432. If the installation is more than two years old you may be using Port 5433. If your backup fails, use PGAdmin to determine the correct port in use.
The first thing to do is create a batch file and add the following commands to it:
For 64 bit servers it looks slightly different:
Note: This batch file uses the forfiles command.
Setting the environment variable:
Change to the Postgres install directory (so that the command can run):
Change to the Postgres install directory (64 bit server):
The next line runs the back up command, appending the date and time to the name and putting it in the correct folder (in this example the destination folder is specified as z:\share\taxcalcbackups):
The last job is to remove all files in the directory older than x days (in this example it is 21 days):
Once the .bat file is created, save it to a directory and test that it works. You can then add it to the task scheduler to make it run at regular intervals.
Open a command prompt as administrator and type the following command (changing it where necessary to set the correct paths and user credentials):
This will create a scheduled task called 'backuptaxcalc', to run every day at 13:00, which will run the tcbackups.bat file. It will run whether the user is logged in or not (as long as the machine is turned on).
Remember: If you change the user password, change the scheduled task as well. You may want to create a specific account under which this can be run. It is your responsibility to ensure the scheduled task is running.
TaxCalc can take no responsibility for automatic backups that do not run