Back up Restore & Optimize Table Data
Use these functions to secure your data and keep your site running fast.
Back Up
To back up a single table, click on the Backup icon in the Action column next to the table to be backed up. If the operation is successful, the page will be redisplayed with
a red message at the top detailing the action taken. The Last Backup column will also be updated, as will the size of the resulting file. If the operation is not successful,
you may not have created a Backups folder, or it may not have adequate permissions. Create the folder in your main TNG folder and give it read/write/execute
rights for world/group/owner n (777 or 775), then go to the General Settings and make sure the folder is named as the Backups Folder. After you have
created an initial set of backups, you should be able to set permissions back to 771 for added security.
NOTE: If all your individual and family data comes from a GEDCOM
import, it is not necessary to back up the People, Children and Families tables, as these backups could be quite large and will only take up valuable space.
In the event of a data loss, you can simply re-import your GEDCOM file to restore these tables.
Restore
To restore a single table, click on the Restore icon in the Action column next to the table to be restored. If the operation is successful, the page will be redisplayed with
a red message at the top detailing the action taken. If the restore icon is not present next to a particular table name, no backup for that table is available.
If a restore attempt produces a database error, you could be trying to restore a table whose current column
structure does not match the structure that was in place when the last backup was made.
Optimize
To optimize a single table, click on the Optimize icon in the Action column next to the table to be optimized. If the operation is successful, the page will be redisplayed with
a red message at the top detailing the action taken. A table should be optimized if you have deleted a large part of the table,
or if you have made many changes to variable-length fields. This will reclaim the unused space and defragment
the datafile, usually resulting in improved performance. Some risks are associated with optimizing large tables, so be sure to back up your tables before
you optimize them.
Back Selected / Restore Selected / Optimize Selected / Delete Selected
To back up, restore or optimize multiple tables at once, or to delete backup files, check the box in the Select column next to the desired tables, then click the appropriate button at the bottom of the page.
To select all tables for any of these operations, click the Select All button. Likewise, all selections can be cleared by clicking the Clear All button.
Other Recommendations
After making a backup, the backup file will be stored in the Backups folder (as defined in your General Settings). It is recommended that you copy these files to
your local machine, since any catastrophic event that affects your database tables could also affect any backups stored on the same computer. If your backup files
take up too much space, you could then delete them from your web site and copy them back if a restore is needed.
It is also highly recommended that you name your Backups folder something other than 'backups', as other TNG users with dishonorable intentions could easily steal your data.
It is also recommended that you give your Backups folder 771 permissions if possible (after creation of initial backups), as this will prevent anyone from obtaining a directory listing of the folder.
Back up Table Structure
To back up your TNG table structure, click on the Backup icon in this section. If the operation is successful, the page will be redisplayed with a red message at the top
detailing the action taken. The Last Backup column will also be populated, as will the size of the file. Having a backup of your table structure will enable you to easily restore your data
in the event that your server suffers a catastrophic failure, especially if your current table structure differs at all from the structure you get from creating the tables again from scratch.
To restore your TNG table structure, click on the Restore icon in this section. If the operation is successful, the page will be redisplayed with a red message at the top
detailing the action taken. WARNING: Restoring the table structure will delete all existing data!