GTG

The backup file location and name needs to be changed in README.me and added to Help.

Bug #2000234 reported by L. P. Luigi Espenlaub
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GTG
New
Undecided
Unassigned

Bug Description

Hi,
This is a revision of Bertrand Rousseau's original, without which I would still be unsuccessfully digging through the bit-buckets and asking the wrong questions.
Thank you much Bertrand
GTG automatically makes several backups of your tasks and projects.
With luck, you should a working backup available.
** However, there seems to have been a major change affecting where and for which to look. **

As discovered and Revised. 2022-12-21
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Where to find the backup files for flatpak 6.0 and above.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Look into
     ___
~/.var/app/org.gnome.GTG/data/gtg/backup/

          _____
Note: Not ~/.local/share/gtg/backup/
  The tags, projects and task xml files are no longer saved.
  All the data formally in the above files is now stored in:
  gtg_data.xml.bak.x
  in the ~/.var location above.

You should find files named like this example:

Name
gtg_data.xml.bak.0
gtg_data.xml.bak.1
gtg_data.xml.2022-12-11.bak

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
How to restore a backup:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

1. Make a copy of the whole
 ~/.var/app/org.gnome.GTG/data/gtg/ including /backup/ folders and files before doing anything!
 This preferably on a USB thumb-drive or other dis-connectable storage device.

2. In:
 ~/.var/app/org.gnome.GTG/data/gtg/
 Move to Trash:
  gtg_data.xml

 Leaving ".directory" in place. [not sure its function but its presence did not pose a problem]

3. In
 ~/.var/app/org.gnome.GTG/data/gtg/backup/
 Pick a file matching:
  gtg_data.xml.bak.0
   or
  gtg_data.xml.2022-12-11.bak

4. Copy it to:
 ~/.var/app/org.gnome.GTG/data/gtg/

5. Rename it to:
  gtg_data.xml

6. Restart Getting Things GNOME!

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Example process (in a shell):
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

1. cd ~/.var/app/org.gnome.GTG/data/gtg/
2. rm gtg_data.xml
3. mv ~/.var/app/org.gnome.GTG/data/gtg/backup/gtg_data.xml.bak.0 ~/.var/app/org.gnome.GTG/data/gtg/gtg_data.xml.bak.0
4. mv gtg_data.xml.bak.0 gtg_data.xml

Note: I am not sure more than mv /gtg/backup/gtg_data.xml.bak.0 /gtg/gtg_data.xml.bak.0
  is needed in step 3. My command line competency is very limited.

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

I have only tested this with the following system and ask others to confirm the above or let me know of needed changes.

-Computer-
4 Processors : Intel(R) Core(TM) i5 CPU M 580 @ 2.67GHz
Memory : 3819MB (2202MB used)
Machine Type : Notebook
Operating System : Ubuntu 18.04.6 LTS
-Display-Res. : 3286x1080 pixels

Operating System
----------------
Kernel : Linux 5.4.0-97-generic (x86_64)
Version : #110~18.04.1-Ubuntu SMP Mon Jan 17 20:50:31 UTC 2022
C Library : GNU C Library / (Ubuntu GLIBC 2.27-3ubuntu1.4) 2.27
Distribution : Ubuntu 18.04.6 LTS

I hope this helps others of the lost and wandering in search of their backup files especially when having to change from the distro version to the flatpak version.

Revision history for this message
L. P. Luigi Espenlaub (luigiwriter2) wrote :

I found the user files path in the README.md file with out the sub-directories GTG now uses confusing.
Also there are no instructions on how to find and restore a backup in either the FAQ or the README.MD file that I could find.

If the gtg_data.xml.bak.x file now truly has the user information formerly in the tags, projects and task xml files. That information needs to be included.

I feel this is important because, after a crash or moving from a distro to the flatpak supported version this information can save the user several hours of flailing around or like me not having the latest version functional for several months, then following the only available but very outdated instructions which had me putting all but the gtg_data.xml.bak.x file in the correct directory.

It was only by opening all the various files in Kate that I was able to determine gtg_data.xml.bak.x file was complete with the correct entries. This being something I would not expect most GTG users to do or know what to look for in any of the XML files.

I know you guys have a lot on your plates, and appreciate your revival of this unique and most useful app. I will continue to recommend it to others. Thanks

Revision history for this message
L. P. Luigi Espenlaub (luigiwriter2) wrote :

I am not sure I phrased things properly. I apologize in advance for my clumsiness.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.