After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 629972 - [backup-restore] Problems restoring old data
[backup-restore] Problems restoring old data
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: Plugins
2.32.x (obsolete)
Other Linux
: Normal normal
: ---
Assigned To: evolution-plugin-maintainers
Evolution QA team
: 628852 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2010-09-18 08:07 UTC by Thomas
Modified: 2013-09-13 01:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
evo patch (11.73 KB, patch)
2010-09-20 15:06 UTC, Milan Crha
needs-work Details | Review
evo patch ][ (11.99 KB, patch)
2010-09-27 09:21 UTC, Milan Crha
needs-work Details | Review
evo patch ]I[ (12.90 KB, patch)
2010-09-27 10:14 UTC, Milan Crha
committed Details | Review

Description Thomas 2010-09-18 08:07:31 UTC
I run quite recent code from the new gnome-2-32 branch on ubuntu maverick.

Did a dump of my evolution 2.28 data via:
/opt/evo/libexec/evolution/2.28/evolution-backup --backup evo-2-28.tar.gz 

Then tried to restore from this archive using the application via the menu
under File. Chose not to restart the app.
Had deleted ~/.evolution ~/.local/share/evolution ~/.config/evolution.
Deleted the sources keys for calendars, tasks and memos via gconf-editor.
Then restarted the app and no calendar data is visible.
Looking in the directories, I see that my ics files still reside in ~/.evolution and were not migrated to ~/.local/share. Also, the category file ~/.evolution/categories.xml is not copied over to ./local/share.

Then I tried it with the command line:
/opt/evo/libexec/evolution/2.32/evolution-backup --restore /mnt/hgfs/linux1_home/evo-2-28.tar.gz

Again had made sure, all directories are pristine and the e-calendar-factory
server were terminated.
That worked to import the calendar data. The categories were not migrated, though.
Comment 1 Matthew Barnes 2010-09-18 18:49:48 UTC
Sounds like you may have left data sitting in the new directories.  The migration routines will not overwrite files already in the new location.  You can run both evolution and e-calendar-factory from a terminal and monitor the migration progress and any issues encountered.
Comment 2 Thomas 2010-09-18 21:44:56 UTC
(In reply to comment #1)
> Sounds like you may have left data sitting in the new directories.

As I said above, deleted /.evolution ~/.local/share/evolution ~/.config/evolution,
deleted key called "sources" for calendar, tasks and memos and did the restore.

>  The
> migration routines will not overwrite files already in the new location.  You
> can run both evolution and e-calendar-factory from a terminal and monitor the
> migration progress and any issues encountered.

All right, will try that next time.
Comment 3 Milan Crha 2010-09-20 15:06:02 UTC
Created attachment 170670 [details] [review]
evo patch

for evolution;

This is fixing the backup-restore plugin, and it should be able to restore old backups properly (by removing actual data/config dirs and keep the migration process on evolution/factory itself).

It also creates a new backup format, which is suitable for changes due to XDG directory conformity. Maybe it should come to 2.32.0 too. Maybe.
Comment 4 Thomas 2010-09-25 21:18:31 UTC
Review of attachment 170670 [details] [review]:

Nope. Did not work. Neither from the app nor from the command line.

tom@ubuntu:~$ /opt/evo/libexec/evolution/2.32/evolution-backup --restore /mnt/hgfs/linux1_home/evo-2-28.tar.gz 
** Message: First result 0
.evolution/
** Message: Second result 0
.evolution/backup-restore-gconf.xml
** Message: Third result 0
** Message: evolution --quit
(evolution:9684): e-data-server-DEBUG: Loaded default categories
(evolution:9684): e-data-server-DEBUG: Saving categories to "/home/tom/.local/share/evolution/categories.xml"
** Message: mv /home/tom/.local/share/evolution/home/tom/.local/share/evolution_old
mv: Fehlender Zieldatei‐Operand hinter „/home/tom/.local/share/evolution/home/tom/.local/share/evolution_old“
„mv --help“ gibt weitere Informationen.
** Message: mv /home/tom/.config/evolution/home/tom/.config/evolution_old
mv: Fehlender Zieldatei‐Operand hinter „/home/tom/.config/evolution/home/tom/.config/evolution_old“
„mv --help“ gibt weitere Informationen.
** Message: mv /home/tom/.camel_certs /home/tom/.camel_certs_old
mv: Aufruf von stat für „/home/tom/.camel_certs“ nicht möglich: No such file or directory
** Message: mv /home/tom/.evolution /home/tom/.evolution_old
mv: Aufruf von stat für „/home/tom/.evolution“ nicht möglich: No such file or directory
** Message: cd /home/tom && gzip -cd '/mnt/hgfs/linux1_home/evo-2-28.tar.gz' | tar xf -

** (evolution-backup:9665): WARNING **: replace_in_file: Cannot read file content, error: Datei »/home/tom/.local/share/evolution/backup-restore-gconf.xml« konnte nicht geöffnet werden: No such file or directory
** Message: gconftool-2 --load /home/tom/.local/share/evolution/backup-restore-gconf.xml
I/O warning : failed to load external entity "/home/tom/.local/share/evolution/backup-restore-gconf.xml"
»/home/tom/.local/share/evolution/backup-restore-gconf.xml« konnte nicht geöffnet werden: No such file or directory
** Message: rm -rf /home/tom/.local/share/evolution/backup-restore-gconf.xml
** Message: rm -rf /home/tom/.local/share/evolution_old
** Message: rm -rf /home/tom/.config/evolution_old
** Message: rm -rf /home/tom/.camel_certs_old
** Message: rm /home/tom/.local/share/evolution/.running
rm: Entfernen von „/home/tom/.local/share/evolution/.running“ nicht möglich: No such file or directory
** Message: rm -rf /home/tom/.evolution_old
^C
Comment 5 Thomas 2010-09-26 11:04:12 UTC
Review of attachment 170670 [details] [review]:

I was on the gnome-2-32 branch. The patch failed in 1 hunk. So, I switched to master, built the whole beast, then started the app,
again having deleted ~/.evolution ~/.local/share/evolution ~/.config/evolution and the sources keys for calendar, task, memo via gconf-editor.
Picking the backup file from my 2.28 version, it gives me the following error message:

* Message: cd /home/tom && gzip -cd '/mnt/hgfs/linux1_home/evo-2-28.tar.gz' | tar xf -

** (evolution-backup:31745): WARNING **: replace_in_file: Cannot read file content, error: Datei »/home/tom/.local/share/evolution/backup-restore-gconf.xml« konnte nicht geöffnet werden: No such file or directory
** Message: gconftool-2 --load /home/tom/.local/share/evolution/backup-restore-gconf.xml
I/O warning : failed to load external entity "/home/tom/.local/share/evolution/backup-restore-gconf.xml"
»/home/tom/.local/share/evolution/backup-restore-gconf.xml« konnte nicht geöffnet werden: No such file or directory

Checking the file myself, it is there and it contains the correct data. The ics files are also transferred correctly to ~/.local/share.
Then I executed gconftool-2 --load /home/tom/.local/share/evolution/backup-restore-gconf.xml myself, restarted the app and the 
calendar data was there, but still my categories would be missing.
Again checking the files, I found that ~/.evolution/categories.xml was not transferred to ~/.local/share. There was only the default categories.
Copying this file by hand, solved this problem as well.
Comment 6 Milan Crha 2010-09-27 09:21:58 UTC
Created attachment 171181 [details] [review]
evo patch ][

for evolution;

Thanks for testing. It failed to remove your previous evolution data and then it consequently failed. I do not know how I could overlook this during my tests of the previous patch, such an obvious error :(

This patch may fix it.

By the way, it should be enough to get rid of ~/.evolution, because the restore process should take care of the rest folders by itself.
Comment 7 Thomas 2010-09-27 09:52:40 UTC
Review of attachment 171181 [details] [review]:

Better, but stil, .local/share/evolution/backup-restore-gconf.xml is there and
contains data after the restore, but did not get loaded. Had to do it by hand again.
categories are there now.

================================
** Message: Second result 0
.evolution/backup-restore-gconf.xml
** Message: Third result 0
** Message: evolution --quit
(evolution:2867): e-data-server-DEBUG: Loading categories from "/home/tom/.local/share/evolution/categories.xml"
(evolution:2867): e-data-server-DEBUG: Loaded 22 categories
** Message: mv /home/tom/.local/share/evolution /home/tom/.local/share/evolution_old
** Message: mv /home/tom/.config/evolution /home/tom/.config/evolution_old
** Message: mv /home/tom/.camel_certs /home/tom/.camel_certs_old
mv: Aufruf von stat für „/home/tom/.camel_certs“ nicht möglich: No such file or directory
** Message: mv /home/tom/.evolution /home/tom/.evolution_old
mv: Aufruf von stat für „/home/tom/.evolution“ nicht möglich: No such file or directory
** Message: cd /home/tom && gzip -cd '/mnt/hgfs/linux1_home/evo-2-28.tar.gz' | tar xf -

** (evolution-backup:2798): WARNING **: replace_in_file: Cannot read file content, error: Datei »/home/tom/.local/share/evolution/backup-restore-gconf.xml« konnte nicht geöffnet werden: No such file or directory
** Message: gconftool-2 --load /home/tom/.local/share/evolution/backup-restore-gconf.xml
I/O warning : failed to load external entity "/home/tom/.local/share/evolution/backup-restore-gconf.xml"
»/home/tom/.local/share/evolution/backup-restore-gconf.xml« konnte nicht geöffnet werden: No such file or directory
** Message: rm -rf /home/tom/.local/share/evolution/backup-restore-gconf.xml
** Message: rm -rf /home/tom/.local/share/evolution_old
** Message: rm -rf /home/tom/.config/evolution_old
** Message: rm -rf /home/tom/.camel_certs_old
** Message: rm /home/tom/.local/share/evolution/.running
rm: Entfernen von „/home/tom/.local/share/evolution/.running“ nicht möglich: No such file or directory
** Message: rm -rf /home/tom/.evolution_old
[Thread 0xb5605b70 (LWP 2850) exited]
Comment 8 Milan Crha 2010-09-27 10:14:28 UTC
Created attachment 171189 [details] [review]
evo patch ]I[

for evolution;

Errr, the final patch, I hope. The gconf xml is under ~/.evolution in the old format, whereas the previous patch was looking for it in your $DATADIR, where only the new format stores it there.
Comment 9 Thomas 2010-09-27 18:46:23 UTC
Review of attachment 171189 [details] [review]:

All right. That works.
Comment 10 Milan Crha 2010-09-29 08:10:00 UTC
Thanks for all the testing.

Created commit 29fcf7f in evo master (2.33.1+)
Created commit 76ec35f in evo gnome-2-32 (2.32.1+)
Comment 11 Milan Crha 2010-10-08 12:56:56 UTC
*** Bug 628852 has been marked as a duplicate of this bug. ***
Comment 12 Jon Cosby 2010-10-13 15:29:51 UTC
I'm having trouble applying this patch to evo 2.30. After applying the other patches, rpmbuild throws an error:

+ /usr/bin/patch -s -p1 --fuzz=0
+ echo 'Patch #103 (bnc-629972-backup-restore.patch):'
Patch #103 (bnc-629972-backup-restore.patch):
+ /bin/cat /usr/src/packages/SOURCES/bnc-629972-backup-restore.patch
+ /usr/bin/patch -s -p1 --fuzz=0
4 out of 15 hunks FAILED -- saving rejects to file plugins/backup-restore/backup.c.rej
error: Bad exit status from /var/tmp/rpm-tmp.oxuGu9 (%prep)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.oxuGu9 (%prep)

I can't find an explanation for this. backup.c.rej is a copy of the patch from what I can tell.
Comment 13 Milan Crha 2010-10-14 06:58:33 UTC
(In reply to comment #12)
> I'm having trouble applying this patch to evo 2.30...

Yeah, the patch is for actual git master, the 2.30 is too old. Also, 2.30 doesn't use this new folder structure, thus it might rather break things for you. The patch is intended for 2.32.0+ only.