Reconciliation

AC gnucash at acarver.net
Mon Feb 23 16:07:04 EST 2015


On 2015-02-23 09:02, John Ralls wrote:

> You mentioned backing up the data: The usual backup-for-every-save
> regime that the XML backend uses wouldn't make any sense for SQL, so
> it isn't there. A simple automatic file backup works fine for
> SQLite3; since I use a Mac, TimeMachine does the job for me. I've no
> doubt that MySql provides some way to back up the database, but I
> don't know what it is. If you go that route you'll want to enable
> it.

There are two ways to backup a MySQL database.  One involves storing the
files that are part of the database wherever the server is storing them
(e.g. /var/lib/mysql is the default in Linux, on Windows it is set at
install).  They are usually only accessible by root/administrator so the
backup job must have the appropriate level of access.  If the MySQL
engine is upgraded then all old backups are typically unusable since
internal binary structures change.  Sometimes they can be migrated byt
the best solution is to run the backup immediately after an upgrade.

The second method involves dumping the database using the mysqldump
utility.  It will generate a complete set of SQL statements that will
create the database, all tables, and populate all the existing data from
scratch.  Since it uses SQL in the file rather than copies of binary
database table files, it can survive across upgrades.  Again, proper
permissions are needed but, in this case, a recurring script must run to
perform the dump at which point the dump file can be backed up using any
file backup system.


More information about the gnucash-user mailing list