Asset Trustee automated database backup
The Asset Trustee database contains valuable information, is easy to back up, and takes very little space. In short, there's virtually no reason not to back up your AT database periodically. This article will describe the steps to create an automated Asset Trustee database backup solution.
First, download this Script.
While the script contains most of what is necessary, it needs to be modified to suit your needs. Open it with a UNIX text editor (vi, BBEdit, TextWrangler, etc.).
There are two things you must modify:
- Change the variable (Backup_Path) to the place where you would like your Asset Trustee backups to be stored. The $(date ...) part is there to timestamp the backup.
For example, let's change it to:
- Input your root MySQL password in the place of 'yourPassword'
The rest of the script needs no modification.
Finally, use the Terminal to change the permissions and move the file to its proper place (It must be on the AT Inventory computer). Here are the two commands. Note that you need to provide the path to the script.
|%sudo chown root:wheel /pathTo/theScript/777.backupATSQLDB.sh |
Password: [input your admin password]
%sudo chmod 700 /pathTo/theScript/777.backupATSQLDB.sh
%sudo mv /pathTo/theScript/777.backupATSQLDB.sh /etc/periodic/weekly/
Well done! Now AT will automatically backup its database every week (if you want to do it every day, or every month, switch /weekly/ with /daily/ or /monthly/). Depending on the size of your AT database, the zipped file will be between 1 and 100MB.