Testing & Backup of GnuCash Files
John Gowing
john.gowing at jotrago.co.za
Sat Dec 21 05:39:16 EST 2013
I've seen many messages about losing data, backup, and testing.
Gnu Cash has a very simple file structure, and it is extremely simple
to backup the file, or take a copy before testing a new function or
experimenting.
For more detailed info see:-
The GNUCash Guide Chapter 2.5 Storing your Finaincial
Data
[1]http://gnucash.org/docs/v2.4/C/gnucash-guide/basics-files1.html
The GNUCash Guide Chapter 2.6 Backing Up & Recovering Data
[2]http://gnucash.org/docs/v2.4/C/gnucash-guide/basics-backup1.html
The GNUCash FAQ section on
FIles
[3]http://wiki.gnucash.org/wiki/FAQ#GnuCash_Files_and_managing_a_Gnu
Cash_installation
You can store GNUCash files arbitrarily in any folder you like.
If you give them the standard suffix of .gnucash double clicking the
file should open it in GNU Cash
Or you can use the File > Open menu, and browse to your file
Assuming you have called your file "MyBooks" then the GnuCash Files
typically look like this in their folder
* mybooks.gnucash - this is your GNU Cas Ledger file, and yes they
do seem amazingly small for the amount of data contained. (mine is
220KB for 10 years of personal data)
* mybooks.yyyymmddhhmmss.log - these are transaction log files
* mybooks.yyyymmddhhmmss.gnucash - these are backups of the data file
taken each time GnuCash saves data to your file
* OR
* mybooks.yyyymmddhhmmss.xac - For Older versions of GNUCash Pre 2.2
these are backups of the data file taken each time GnuCash saves
data to your file
What are these files and what can you do with them?
GNU Cash files are so small there is no problem with keeping many
copies of them
mybooks.gnucash
This is your main data file. GNU Cash refers to it as the
"Ledger" file. I call it the "Production" file
Copy or Move it
If you need your data on another computer, in a cloud service, on
your table, simply copy this file wherever you need it.
Back It Up
Simply copy this file to somewhere safe to backup your precious
data.
A local Backup folder; A Backup Folder on another Partition, Drive,
Usb Stick, Network Server, Smart Phone, Cloud Service etc.
Automate this process with any of the myriad tools available. Folder
Sync (win), Sync tools, rsync (linux) , Backup Programs, Cloud Apps
like DropBox, Ubuntu One, Google Drive etc etc
Send a copy every Month end to your Accountant, Auditor, Bookkeeper.
It takes up minimal space, provides an offsite Copy, and if your
professional uses GNUCash they have instant access to your
information.
TESTING in GNUCash is CRITICAL, why? THERE IS NO UNDO in
GNUCash.
If you make a mistake it is too late, and often figuring out how to
reverse that mistake is tortuous and time consuming and more often
than not leads to further mistakes and more problems
SO ANY TIME you are not sure, TEST FIRST
For Testing I keep a subfolder called "Test". Like saving a game
before risking instant death, and attempting to slay the beast, copy
your current file to test, open it from there, try out your idea,
function, or transaction.
Repeat until you get it right. Document your procedure
Then go back to your Production file, referring to your
documentation, perform your function and continue.
Take "CheckPoints"
Any time you reach a significant point in your GNU Cash take a
Checkpoint copy. EG Before trying something new, Tax Day, Month End,
Year End, Major Changes, Additions, Deletions, Implementation of new
features etc
Rename the file with a date stamp & description or use a folder
structure to explain the reason for the Checkpoint. Maybe even save
a small text file with a more detailed explanation if necessary.
This may prove invaluable if you have to come back to a file after
several years (Eg for a tax audit)
You can even take a zip file copy of the entire folder, generally
they are quite small in todays world of TeraByte drives.
mybooks.yyyymmddhhmmss.gnucash (or .xac)
These are Backups of your ledger file which GNU Cash creates
whenever you save changes to the file.
GNU Cash keeps these for a configurable period of time (
Edit/Preferences/General/Files > "Retain log files" )
If you run into a problem, or experience corruption, in your
production file, (maybe because you forgot to TEST something and
tried it on your Production file, or you forgot to take Backups) you
can go back through these backup files until you find a clean copy.
IMPORTANT - NEVER simply OPEN a Backup file directly. BACKUP your
Entire GNUCash folder to a safe place BEFORE PROCEEDING
If it is a good one, it is the most important file you own at this
moment in time. There is only this one copy of it, And, If you open
it you risk corrupting it again.
COPY it to your TEST folder, rename it appropriately, eg
mybooks.yyyymmddhhmmss.Recovery.gnucash and then open this TEST copy
Now check if it is good.
If it Is, MAKE ANOTHER BACKUP of it IMMEDIATELY
Now Copy it back to your Production folder, rename mybooks.gnucash
to mybooks.yyymmdd.broken.gnucash.
Now rename your good file to mybooks.gnucash
And you should be able to proceed.
mybooks.yyyymmddhhmmss.log
These are Transaction Log files created by GNU Cash containing
details of transactions applied to your Ledger file
If you are diligent with your backups, and testing as described
above, hopefully you will never need to "replay" these log files.
If it becomes apparent that this may be necessary refer to the
GNUCash FAQ for details on re-processing Log Files.
[4]http://wiki.gnucash.org/wiki/FAQ#GnuCash_Files_and_managing_a_Gnu
Cash_installation
See the section "Q: Gnucash crashed and lost a bunch of my edits.
How do I recover them?"
Tips on making Checkpoint Copies
It is useful to make checkpoint copies of your GNUCash Ledger for
specifc purposes, eg Year End.
You may have noticed that if you close GNUCash with a number of
Account or Report tabs open, it remembers these and they are there
when you next open GNUCash.
For your Year End Checkpoint, display your major accounts, Run all
your major reports, Set Options, Titles, Formats etc. EG income
statements, Assets & liabilities etc, leaving the tabs open.
Now simply Close GNUCash
Now Copy your GNUCash Ledger File, or better still Zip up the whole
folder, and Save it in a YearEnd-YYYY folder.
Now when you need to open a new account at a vendor, bank, apply for
a loan, etc and you are asked to produce your last n years financial
statements you can simply open the appropriate year GNUCash File and
print off the reports.
I hope this assists you in running a safer and more reliable GNU Cash
--
_______________________________________________________________________
John Gowing
[5]JoTraGo - Right First Time, Better Next
JoTraGo
+27 (0)83-301-8731 - Mobile
+27 (0)87-701-2630 - Office
+27 (0)86-670-9882 - Fax
[6]www.jotrago.co.za
References
1. http://gnucash.org/docs/v2.4/C/gnucash-guide/basics-files1.html
2. http://gnucash.org/docs/v2.4/C/gnucash-guide/basics-backup1.html
3. http://wiki.gnucash.org/wiki/FAQ#GnuCash_Files_and_managing_a_GnuCash_installation
4. http://wiki.gnucash.org/wiki/FAQ#GnuCash_Files_and_managing_a_GnuCash_installation
5. http://www.jotrago.co.za/
6. http://www.jotrago.co.za/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: JoTraGoLogoGrey264x264.gif
Type: image/gif
Size: 1945 bytes
Desc: not available
URL: <http://lists.gnucash.org/pipermail/gnucash-user/attachments/20131221/cc9d1d43/attachment.gif>
More information about the gnucash-user
mailing list