← Back to team overview

gtg team mailing list archive

Re: [Question #196249]: Restore xml file

 

Question #196249 on Getting Things GNOME! changed:
https://answers.launchpad.net/gtg/+question/196249

    Status: Open => Answered

Bertrand Rousseau proposed the following answer:
Hi,

GTG automatically makes several backups of your tasks and projects.
With luck, you should a working backup available.

Look into .local/share/gtg/ in your home. You should find files named
like this:

XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX.xml
XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX.xml.bak.<N>
projects.xml
projects.xml.bak.<N>

where the X's are letters or numbers (this actual sequence of letters
and numbers is different for everyone it's a kind of random pattern),
and <N> is a number between 0 and 7.

example content of .local/share/gtg/:

ea8d1d10-0a33-4ae7-aa34-fb85f7556e16.xml
ea8d1d10-0a33-4ae7-aa34-fb85f7556e16.xml.bak.0
ea8d1d10-0a33-4ae7-aa34-fb85f7556e16.xml.bak.1
projects.xml
projects.xml.bal.0
projects.xml.bal.1

Here's how you can restore a backup:

NOTE:I suggest you make a copy of the whole directory content before
doing anything!

Then do the following:

1) remove XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX.xml and projects.xml.
2) Pick a pair of matching
XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX.xml.bak.<N> and
projects.xml.bak.<N> (with the same <N>)
3) Rename them to XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX.xml and projects.xml
4) Restart Getting Things GNOME!

Example process (in a shell):

1) cd ~/.local/share/gtg/
2) rm ea8d1d10-0a33-4ae7-aa34-fb85f7556e16.xml projects.xml
3) mv ea8d1d10-0a33-4ae7-aa34-fb85f7556e16.xml.bak.0
ea8d1d10-0a33-4ae7-aa34-fb85f7556e16.xml
4) mv projects.xml.bak.0 projects.xml

If the backup files are sane, this should restore your tasks with
little or no loss! You may have to try several backup until finding a
good one.

Bertrand

On Sun, May 6, 2012 at 5:05 PM, Niels
<question196249@xxxxxxxxxxxxxxxxxxxxx> wrote:
> New question #196249 on Getting Things GNOME!:
> https://answers.launchpad.net/gtg/+question/196249
>
> After an error while starting gtg all my tasks are gone. The tasks are still in the xml file and the projects.xml file refers to the right file. Still, when i open gtg there are no tasks visible.
>
> could you suggest a way to repair this?
>
> thanks
>
> Niels
>
> --
> You received this question notification because you are a member of Gtg
> developers, which is an answer contact for Getting Things GNOME!.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~gtg
> Post to     : gtg@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~gtg
> More help   : https://help.launchpad.net/ListHelp


-- 
Bertrand Rousseau

You received this question notification because you are a member of Gtg
developers, which is an answer contact for Getting Things GNOME!.