Every now and then, someone tells me that they made a mistake during a GEDCOM import, or that they installed the full version instead of the upgrade, or that something else happened to cause them to lose their data. When that happens, the first thing I ask is always, “Did you have a backup?”
More often than not, however, there is no backup. In fact, I’m surprised at the number of people who have never backed up their data. Even if you never make any mistakes with your data, there’s always the chance that something out of your control could happen, and without a backup, you could lose months or years of work.
The easiest way to do a backup is to log into your TNG Admin area and go into the Utilities section. From there you can back up all the tables at once, or you can do them one at a time. Either way, you should see a date there indicating the last time you did a backup (if you don’t see a date, you’ve never done one!).
While you’re there, it’s also a good idea to back up the table structure (the second tab). If for some reason an upgrade adds a new field in the wrong order or fails to delete an obsolete field, or if a mod you installed is responsible for something like that, then the layout of your backup files might not match the default table structure. If this has happened to you, and if you ever move your site to a new host and try to restore your backups there, you could have a problem. Having a backup of the table structure could save you there.
Once you’ve backed up a table, a file with the extension “.bak” is created in the backups folder on your site. For a little extra insurance, use an FTP program or an online file manager to download those .bak files to your computer for safe keeping.
There are other ways to back up your data, and some might be better than the one I just described, depending on your situation. For example, if your database becomes extremely large (we’re talking more than 100,000 names), then TNG’s built-in backup utility might time out on you. You can read more on these other methods on the TNG Wiki.
Whichever methods you use, make it a point to do backups regularly. If you install an upgrade, do another backup immediately afterward, as a backup done before the upgrade may no longer work completely if the upgrade altered the table structure.
Restoring a backup
Should you find yourself in a situation where you need to restore a backup you made within TNG, just go back to the Admin/Utilities page. As with backups, you can restore all the tables, or any subset you require.