Having a backup of your kiwitrees data is an essential part of managing your web site. This module provides a way to store your backup files in a Dropbox account.
There are two main areas you should backup regularly:
- Your kiwitrees database (MySQL)
- Your media objects (the folder “/data/media/”)
Other things you might also want to protect could be:
- A GEDCOM file copy of your family tree data (but remember that all of the same information is held in your MySQL database)
- Custom theme files you have created (see this FAQ)
- Historical time line files you use (e.g. “histo.en_GB.php”)
With a little thought and preparation of the above can be saved to your Dropbox account as often as you want using this module.
I do not recommend keeping a backup of the kiwitrees software, as that is always easily downloaded and re-installed from this site.
The module, once fully set up as described below will, from a single click, copy any files or folders you choose from your kiwitrees/data/ folder to your Dropbox account.
Setup and use the “Backup to Dropbox” module
Important note: before planning to use this module you must have your own Dropbox account. If you do not already have one, it can be created, at no cost, following the instructions on this page: https://www.dropbox.com/en/help/8402 . You also need to create a “Dropbox app”, which is described in the second step below.
1 – Enable the module in kiwitrees (Administration > Modules > Manage modules)
2 – Create a Dropbox app
Creating the app takes only a few moments. It is done at this web page: https://www.dropbox.com/developers/apps/create . On the first page select the options as shown below, and include your own choice of title for the app. I chose “Kiwitrees file backup” for mine, but it can be anything, except that it must be unique across all Dropbox accounts, so you may need to get creative! Then click “Create app”.
click to enlarge
On the second screen check the first set of entries are as you wanted, then look for the “Generate” button for your access token. Click that.
click to enlarge
When the access token is displayed you need to copy and keep it. You will need to use it in kiwitrees when you set up the module.
click to enlarge
3 – Set up the kiwitrees module (Administration > Tools> Backup to Dropbox).
click to enlarge
- In field “A” enter the title of your Dropbox app.
- In field “B” enter your Dropbox access token. (Note: The module will not work until both A and B are entered.)
- In field “C” (optional) list any files or folders that exist in your kiwitrees/data/ folder that you do NOT want to backup to Dropbox.
- Click “Update” to save these entries.
The module is now ready to use. In the lower half of the page is a list of the files and folders ready to be copied to Dropbox.
Some hints and tips on using this module
- If you want to backup any other files, such as custom theme files, place copies of them in your kiwitrees/data/ folder, or any sub-folder of it that you choose to create. They will have no effect on the operation of kiwitrees, but will be available for backup to Dropbox.
- To place a backup of your kiwitrees MySQL database in Dropbox there are to methods to consider:
- If you use the kiwitrees add-on “MySQLDumper” (“MSD”) module, then you have the option to send a copy of the backup file it creates straight to your kiwitrees/data/ folder. This is my preferred solution. If you look at the image in 3. above you will see files like “family_2016_09_14_15_39.sql.gz”. These are from MySQLDumper and are the last two complete database dumps. This FAQ is not intended to explain how to use MSD, but the area to look in to get copies in the /data/ folder is Configuration > FTP in the MSD tool.
- If you prefer to create manual dumps of the database using phpMyAdmin or a similar database tool, then simply copy the zipped file it creates into kiwitrees/data/.
- A warning: if you have a large number of media objects the process of copying them all to Dropbox can be very slow, and may cause your server to timeout (error 504). Generally if you click f5 (on PCs) to refresh your screen the process will continue. In testing it was particularly bad when a large number of media sub-folders were used.
- I have not yet found a satisfactory way to provide feedback on the progress of the copying. But most browsers do display (often in the browser tab label) a “spinning disk” to show that a process is still running.
- To include a copy of a GEDCOM file of your family tree data you should go to Administration > Family trees > Manage family trees ; select “Export a GEDCOM file”, and click “continue” by “A file on the server”. A new GEDCOM file is now in your kiwitrees/data/ folder.
- If files and folders you do not want to backup are in the list of “files and folders that will be sent to Dropbox” either:
- add them to field “C” as described above, so they will be excluded, or
- go to Administration > Site administration> Clean up data folder and delete them.