Backing up your data files
You do backups of your TNG data and regularly, right? Of course, we all have those great intentions. We plan to back up weekly, or monthly or quarterly, or whatever inspires us. Nope; instead we toil away every night, plowing in more and more genealogy information. That is way more fun and satisfying. Or perhaps we are not doing backups because we don’t know just how easy it is.
UPDATE as of September 2018: Your TNG Team has added an automated backup routine for your TNG site. Each Monday, early in the morning and depending on your local time zone, your TNG website is automatically backed up, using the built-in backup utility of TNG, as better explained below. You can still elect to do your own backups, especially if major changes are done. However, you also have the comfort of knowing your backups are being done, regularly, behind the scenes. And you can restore the backup at any time.
First, a comment on two types of information stored in TNG. This is because there are two different areas for holding such information. TNG stores images for us, images of family, of documents, of places, of headstones. These are files, such as JPEG and PDF files, which are stored in subdirectories within your TNG website. The other area for holding information is inside of a database, and that is the backup that will be discussed here.
All of the genealogy family tree information goes into TNG’s database. Your information on the individuals, families, notes, sources, repositories, histories and such, are stored in a database. Basically, anything that you type in, such as names, dates and text, go into the database. The backing up and restoring of an entire database requires certain technical skills to do it correctly. Fortunately, TNG has some built-in utility tools that make it a snap.
Let’s have a look. Log into your TNG site as administrator, and from the Administration page, go to Utilities. The top menu shows: Tables, Table Structures and Resequence ID’s.
A table is just a group of data records in one related category of information: events, notes, sources, most wanted, branches, individuals and so on. A set of tables will make up your database.
We will just look at the Tables option for now.
If you have not done a backup before, your screen will look something like this:
The two icons under the Action column are: Optimize and Back up. Doing a backup does not alter your database itself. Try it: click on the Back up button for any of the tables. In a few seconds, the other columns will show information.
If you want to do all of your tables at once, Use the Select All and Clear All buttons at the top, then use the “With selected:” pull-down list to set the action. Here is a screenshot after I had individually backed up two tables. The extra third icon is: Restore.
So where does the backup go? A file is added to your backup subdirectory on your TNG site. If you have access to that folder, say through ftp or the cPanel, you will see the accumulations of the backup files:
Your file names might be different, depending on general settings and file paths. What is inside the backup file? Just plain text: your data, separated by commas, in a format that database tools understand.
So you have accomplished the first stage of doing backups. And it wasn’t that hard. Set aside a few minutes each week or month, or after a hard slog of heavy data entry, to just visit the Utilities page and do a full backup. Some day, hopefully not too soon, you will appreciate having done this.
If you want even more backup security, then download all of your current files in the backup folder to some storage area on your home computer. The USB memory sticks are excellent tools for holding your backup files.
You might be wondering why I have not suggested using GEDCOM files for backing up TNG? Yes, that can be done, and it is the better way to keep your home computer family tree application and your TNG in sync. But GEDCOM may not capture everything. The TNG backup files will capture your User information for example, but not GEDCOM, but no harm in dong both types of backups while you are at it.
If you have a very large study, say 50,000 or more individuals, you might find that backups take a long time, or you might exceed your host’s allowed execution time, or file size limitations. In those cases, you should consider file download tools, such as ftp.
Restore, optimize and fine-tune your data files
In the previous article above, we looked at backing up your TNG data files. Now, how do we restore those files? And is there anything else we can do to better use our backup system?
Let’s go back to the utilities area; log in as Administrator, then click on the Utilities tile.
To restore any file (or table data), click on the Select box for that file. If you want to restore all of the files, click on the Select All button. If the file was never backed up, the Restore icon will be missing for that file and the “Last Backup” and “File Size” box will be blank. Now click on the pull-down list and pick Restore, and click on the Go button.
You will see in the Message column either a success or failure message for each file you are restoring, hopefully all will be successful. If you do get a failure, it could mean that the data table structure no longer matches the restore file column structure. That could happen if your backups are from an older TNG version, or perhaps a mod has altered (“enhanced”?) one of your data tables.
It sure would be nice if TNG could remind me to do a backup from time to time. Well yes, it can. There is a backup reminder feature on your Administration page, at the top (for TNG version 11 onwards). Along with other useful messages, it will remind you of pending backup schedules. You can set the intervals of backup reminders in the Administration area. From the Administration page, go to Setup, then General Settings, and then Miscellaneous. The last box is: “Alert if no backup in this many days”. The default is 30 days but you can overwrite that.
If you were also planning to import a [GEDCOM article link to be added] file, it is strongly recommended that you do this backup procedure first, on all of your data tables. The GEDCOM is going to overwrite your existing files, and if that produces undesirable results, at least you can restore back to the original values. (My thanks to Jim Culbert, member #4096, for this tip).
One selection in the pull-down list is to “Optimize”. If you have deleted a large part of any table, say cemetery records, TNG still retains storage space in the database for those records, even though you have deleted them. That is now wasted space and can drag down your speed in record searches. Doing an Optimize will reclaim that space and will likely improve TNG performance. Now, there is a bit of risk when you optimize large tables, so it is prudent to do another backup before optimizing.
Note: on this page, the three menu tabs are: Tables, Table Structure and Resequence ID’s. We have been spending time in the first tab. You can have a look at the other two, but they are not needed if you are part of the Guild Members’ Websites Project (MWP) or the Family Genes site. These are useful for stand-alone TNG sites only.
Back up Table Structure
If you have a stand-alone TNG site, you might want to do a table structure backup. This would only be of use if your server at your internet host provider suffered a catastrophic failure. If you are part of MWP or Family Genes, your TNG team looks after that for you. Please note, that should you do a restore of the table structure, all of your existing data WILL be blown away.
This feature has been disabled for the MWP and Family Genes participants. Otherwise, doing a resequencing of ID’s should only be undertaken if you never want to synchronize the family trees with your home computer application. Resequencing can also lead to broken internet links or bookmarks pointing to your site, and it could corrupt search engine indexing.