What are files named something like Filename.gnucash.tmp-a00396

Colin Law clanlaw at gmail.com
Wed Feb 4 12:55:08 EST 2015


On 4 February 2015 at 17:39, Dennis Shimer <dshimer at gmail.com> wrote:
> Derek
>
> No to the server question (other than the previously mention bittorent
> sync).  User said he got some kind of "could not save" message at which
> point he stopped and we will talk later tonight.
>
> Colin
>
> Working on the "something interrupted" theory (I'll worry about tracking
> what later).  As I read Fred's reply and the steps in order it seems like
> the tmp file is created from the existing data first which seems like it
> should be the latest iteration of the file.  I'll know later when we examine
> it together. In trying to understand the log files; if I have a backup and a
> log file with the same date stamp name, will the log file bring the backup
> up to date with the last changes or does that log file track what it took to
> get up to that named backup? Or put another way does the log file start
> recording after the backup is made?  The more I try the more confusing my
> question seems, do you get what I'm saying?

My understanding is that the backup file will be the accounts before
the save (so at the start of the session), so applying the changes in
the latest log to the latest backup (with the same timestamp) will
give the new saved file.
When one clicks save the accounts file is still as it was at the start
of the session, the save creates the tmp file with the original file +
changes,   renames the original file to add the timestamp for the
start of the session (which matches the log file for the changes
during that session) (so at this time the tmp file exists with the
latest data, and the old file has been renamed with the timestamp and
there is no file with the original filename) and provided it is not
interrupted then renames the tmp file with the original filename.

Colin
>
> Dennis
>
>
> On Wed, Feb 4, 2015 at 11:54 AM, Colin Law <clanlaw at gmail.com> wrote:
>>
>> On 4 February 2015 at 14:52, Derek Atkins <warlord at mit.edu> wrote:
>> > Hi,
>> >
>> > Dennis Shimer <dshimer at gmail.com> writes:
>> >
>> >> I understand the backups and the log files but recently I had friend
>> >> with a
>> >> gnucash file just disappear. One day it's there, the next it isn't I'm
>> >> not
>> >> done helping him trace down what actually happened but there was a file
>> >> with the extension .tmp-a00396. I know he is using a fairly recent
>> >> version
>> >> on Windows 7 and the file looks like something ver near the last saved
>> >> version of the .gnucash file.
>> >>
>> >> What is this file, where does it come from, and how likely that it is
>> >> in
>> >> fact a complete copy of what he was last working on?
>> >
>> > You say this is on Win7; is this on a file share server, by chance?
>> >
>> > This file is a temporary file that GnuCash uses during the save process.
>> > It creates a new file, writes the data into it, then moves the old file
>> > to a backup and renames the temporary file to the filename.  If GnuCash
>> > gets interrupted during the process it could, theoretically, leave the
>> > temp file hanging around.
>>
>> Since I think the OP's original problem was that his accounts file had
>> disappeared then possibly what happened was that gc was interrupted
>> (power fail for example) just at the moment the old file had been
>> renamed to the backup file, but before the temp file was renamed to be
>> the original accounts file name.  That would explain both the presence
>> of the temp file and the absence of the original file.
>>
>> Colin
>
>


More information about the gnucash-user mailing list