GNOME Bugzilla – Bug 629972
[backup-restore] Problems restoring old data
Last modified: 2013-09-13 01:04:06 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.
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.
(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.
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.
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
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.
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.
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]
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.
Review of attachment 171189 [details] [review]: All right. That works.
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+)
*** Bug 628852 has been marked as a duplicate of this bug. ***
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.
(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.