This module allows you to export and import the contents of your database to text files containing SQL scripts. This is not the most compact or efficient format, but it simple, reliable and portable. If you want efficent, there are much more appropriate tools available.
A separate file is generated for each table, and each can be imported/exported separately. Although an "import all" option is provided, you may find that your server time limits prevent this from completing.
Files are created in the index directory, so this can be useful for creating backups of your system. They can also be useful for transferring data between different databases, for example, between sqlite on your home PC and MySQL on your webserver.
**FOR MYSQL USERS ONLY**, there is also an option to convert your database tables from latin (single byte) encoding to UTF8 (multibyte) encoding. This change is necessary to allow the database to perform case-insensitive searching of letters containing diacritics and non-latin character sets.
By default, PHP communicates with MySQL in latin text. When PGV sends UTF8 text to the database, MySQL treats multibyte characters as a number of "extended ascii" characters, and converts these characters to UTF. This incorrect encoding (and possible double-encoding) is what prevents the database from searching data. Luckily, the reverse encodings take place when we fetch the data back, so apart from the wasted conversion effort, this process is transparant to PGV.
In order to use UTF8, we need to tell MySQL that we are using UTF8. However, to do this on an existing database means that we will fetch old/existing data using different conversions to those used to store it - and our data will be corrupted.
We therefore need to convert our data before changing the way we talk to MySQL. The steps to be taken are
1) export all the tables
2) convert all the tables to utf8
3) update your config.php to set $DB_UTF8_COLLATION=true;
4) import all the tables
NOTE: If your login name contains non-ascii characters, then you *may* get logged out between steps 3 and 4. To prevent this, create an admin account with an all-ascii username before starting.
NOTE: If you have the default MySQL configuration (latin tables and latin communication), then steps 1 and 4 are optional. However, we can't reliably detect this configuration, so unless you are certain, don't skip them. Also, running step 2 repeatedly may corrupt data, meaning you do need to run steps 1 and 4. In fact, unless you have a very good reason (e.g. you know exactly what you are doing and have large tables on a server with very low execution time limits), then don't skip these steps.
NOTE: If you have low server time limits, then it may not be possible to import some of your large tables before it times out. These tables are likely to be your gedcom-data tables. They can easily be reconstructed by reimporting the gedcom.
NOTE: This procedure can destroy your data and prevent you from logging in. Do not do it unless you understand what you are doing. Even if you know what you are doing, you should make a backup before you start.