While designing Centurial, considerable thought went into the way your family data is stored. In this blog we take a look at these design goals, and what they mean for your backup strategy for Centurial projects.
Back in 2016, when I first started working on Centurial, quite a lot of time went into designing the data storage aspect of Centurial. As a genealogist, we can come to collect quite a large amount of data, not only the uncovered evidence in all the different sources but certainly also a huge amount of digital scans, photos and website screenshots. This digital body of data is one of the main results of our research and therefore deserved some good designing.
The first choice I had to make was between storing all this data 'in the cloud' as it's called these days, which means on a server of some company, or on the PC or laptop of the Centurial user. Now I tend to quite value my privacy, and I soon decided to go with the local storage concept: with Centurial, genealogical data never leaves the PC or laptop of the user.
After spending some time with several other genealogy software applications, I noticed all these applications store their data in a format that has been dubbed a pile-of-files format. What this means is that for each research project, these applications create a directory on the disk of the user. In this directory, the application then creates many different files and subdirectories, each containing a part of the research: a pile-of-files. This way of storing your research always makes me a little nervous, as in my mind this immediately raises questions like "which of these files should I copy, should I ever decide to move to a new PC or laptop?" and "which of these files should I include in my backup?". Based on these observations, I formulated a second design goal: with Centurial, all research data is contained in a single file.
On the websites of these other genealogy applications, I sometimes came across long pieces on documentation on how to restore a research project in case it had gone corrupt. Excuse me!? Shouldn't that be part of the core design of any well-engineered piece of software?! Well, at least I made sure it was one for Centurial: in Centurial, the data is stored reliably and robustly, and migrations should be transparent to the user.
It was around this time in the design process that I learned about the existence of SQLite, pronounced (at least by the author of SQLite) as S-Q-Lite. SQLite is a "C-language library that implements a small, fast, self-contained, high-reliability, full-featured SQL database engine". A bit perplexed that I had never stumbled upon SQLite before in my years as a software developer, I soon became very excited about the possibilities of using SQLite as a storage format for Centurial. Why? Well:
In the past three years, I've become a great fan of SQLite. It has never given any problems, and it truly does just work. So far, not a single Centurial user has ever reported losing any research data (or perhaps maybe once, a little, but that was my bad...).
So the Centurial project file is actually an SQLite database file on your local disk with the .cent extension. Every Centurial project file contains all the source details, the information and claims from the sources, the evidence and all the conclusions for that project. Also, all digital scans, images and photos added to the File Explorer of the Source Editor view are contained in this one Centurial project file.
You can use the Project dialog to have a look at the storage size of your Centurial projects. For example:
The data storage size indicates the size of the source, information, claim, evidence and conclusion data. The files storage size indicates the total size of all the documents and digital images in your project.
Now the great advantage of having a single project file is, that you always know where your project data is. It's not spread out over many different files and directories, no, it is contained in that one, single .cent project file. Do you want to move your research to a different PC or laptop? Install Centurial on your new machine, transfer the single project file using an external hard drive, and your good to go.
As you spend more and more time on your research, the size of your project file will grow ever larger. Centurial project files of over 10GB have been spotted in the wild! Because of SQLite, this size (and much larger) is no problem for Centurial.
However, the size of such a Centurial project might become a problem for the user:
The first challenge is a real concern, but changing the Centurial project file into a pile-of-files would be a fake-friend. If Centurial would store all project data as a pile-of-files, then yes, the data could be moved around more easily. But then, the connection between the different pieces of data could easily be lost! If anything, the single Centurial project file makes it very clear to the user that all data in the project is related and should not be partially copied or moved. And: a Centurial project file is usually smaller than if it were a pile-of-files.
To tackle the second concern, Centurial has from a very early v1.1 been equipped with a dedicated backup system. The system is activated quite easily, and users are tempted to do so during the initial setup sequence. Open the Settings dialog from the TOOLS menu, and navigate to the 'Backup' tab:
To activate the automated backup system, simply check "Yes, I want to make backups of my Centurial project files.", supply the path of the backup directory, and click 'OK'. After that, for every change you make in any your Centurial project, a backup will be automatically created at the given backup directory.
Now the main concern for a successful backup strategy is to make sure your backups are placed on a location outside of your PC or Laptop as soon as possible after creation. This way, if your PC or laptop suddenly crashes and burns, or gets stolen, or lost, you will always have your backup to go back to.
The first way to achieve this is by using a cloud storage solution, like Dropbox, Google Drive, OneDrive or any other. These cloud storage solutions usually come with a sync app that automatically syncs the contents of a directory on your local drive with a directory in your cloud storage. The way to go then is to select (a directory within) this local sync directory as the backup path. This way, every time you edit your research, Centurial automatically creates a backup in this directory, and the sync app then copies this backup to your cloud storage. Your changes will be securely copied off of your machine within a minute or so.
Another way, which does not depend on some cloud storage, is to use a local network-attached storage, or NAS for short. A NAS is like an external hard drive that is attached not to your computer but to your network, behaving like a file server. By selecting a directory on the NAS as your backup path, backups created by Centurial are copied to your NAS immediately.
Part of any successful backup strategy is to never place your Centurial project in the local Cloud storage directory or on the NAS. Because if you would, any time you change to the Centurial project, the complete project file will be copied to your cloud storage or NAS. When this project file is small, this will not be a problem. But a medium-sized project, say 100MB, might start to cause some serious problems when it is copied every 10 seconds or so!
To summarize, a successful backup strategy for your Centurial projects consists of 2 parts:
So Centurial backups are optimized for file size in order to prevent large amounts of data to be continuously transferred to your cloud storage or NAS. However, as Centurial creates a backup for every change you make to your project files, your backup directory might become too large anyway. That is why Centurial is equipped with a garbage collector for backups. The garbage collector makes sure the number of backups does not grow too large.
The policy of the collector is to keep more recent backups but to start removing backups as they become older. This means that
The garbage collector always keeps the most recent backup in the given time frame.
To restore a backup of a Centurial project, select 'Restore a backup' from the QuickStart dialog. In the source step of the wizard, you are asked to select the backup that you would like to restore. You can select the project to restore the latest available version of the project, or you can drill down to a more specific backup.
In the target step, you choose the name of the restored project (defaults to the original project name) and the location of the project.
After that, the summary step shows you the summary of the selected source and target settings.
Click 'Next' to restore the project. After the restore is complete, Centurial will open the restored project.
Setting up a successful backup strategy in Centurial takes about 5 minutes, which is time well spent once your PC or laptop decides to kick the bucket. Better safe than sorry!