We have moved to a new Sailfish OS Forum. Please start new discussions there.
26

HowTo: restore lost 3rd party apps settings after Update 1.0.3.8? [answered]

asked 2014-01-31 20:21:26 +0300

ossi1967 gravatar image

updated 2014-02-04 13:25:58 +0300

foss4ever gravatar image

After the January update, settings/user data for certain 3rd party applications are gone. Details discussed here: http://talk.maemo.org/showpost.php?p=1410044&postcount=26

Sailors, is there a way to get them back from their old location? I was not prepared for an OS update to delete my user data.

edit retag flag offensive reopen delete

The question has been closed for the following reason "the question is answered, an answer was accepted" by ossi1967
close date 2014-02-01 13:48:14.832057

Comments

1

Anyway - when you have any important data, you need make backup before update. :)

Kaacz ( 2014-01-31 20:58:27 +0300 )edit
1

I'll mark this as closed as it is solved for me. Of course pycage was write when he commented in another question about this that a "solution" that requires developer mode isn't a real solution...

ossi1967 ( 2014-02-01 13:48:04 +0300 )edit
1

Is there any rationale why the path was changed in the first place?

foss4ever ( 2014-02-01 15:25:56 +0300 )edit

I read the reasons behind this change and I might understand that.

BUT you're applying this change to a phone in the hand of the users, Jolla should have provided a simple migration app from where I would select the apps for which migrate the data to the new path. How long does it take to write this, an hour maybe?

Nor this "change" has been mentioned in release notes, that is bad.

Jolla imho should improve to not disappoint enthusiast customers that are financially supporting the project.

Hopefully soon we'll see a settings migration app.

c.la ( 2014-02-04 09:57:45 +0300 )edit

@thp Thanks for the script to migrate the settings. Maybe your Answer below could have been better place to post those links. That would then becone the most complete answer, and make this a HowTo-article.

foss4ever ( 2014-02-04 13:20:56 +0300 )edit

4 Answers

Sort by » oldest newest most voted
11

answered 2014-01-31 21:57:59 +0300

pycage gravatar image

updated 2014-01-31 22:14:49 +0300

Thought I'd share... Close the affected apps first.

For copy & paste:

for d in `find /home/nemo/.local/share/harbour-* -mindepth 1 -maxdepth 1 \! -newer /`; do dir=`dirname $d`; name=`basename $dir`; echo rm -rf $dir/$name; echo mkdir $dir/$name; echo mv $d $dir/$name/; done

Verify that it prints out the right things to do, for instance

rm -rf /home/nemo/.local/share/harbour-tidings/harbour-tidings
mkdir /home/nemo/.local/share/harbour-tidings/harbour-tidings
mv /home/nemo/.local/share/harbour-tidings/QML /home/nemo/.local/share/harbour-tidings/harbour-tidings/
rm -rf /home/nemo/.local/share/harbour-tinytodo/harbour-tinytodo
mkdir /home/nemo/.local/share/harbour-tinytodo/harbour-tinytodo
mv /home/nemo/.local/share/harbour-tinytodo/QML /home/nemo/.local/share/harbour-tinytodo/harbour-tinytodo/
rm -rf /home/nemo/.local/share/harbour-webcat/harbour-webcat
mkdir /home/nemo/.local/share/harbour-webcat/harbour-webcat
mv /home/nemo/.local/share/harbour-webcat/QML /home/nemo/.local/share/harbour-webcat/harbour-webcat/
rm -rf /home/nemo/.local/share/harbour-webcat/harbour-webcat
mkdir /home/nemo/.local/share/harbour-webcat/harbour-webcat
mv /home/nemo/.local/share/harbour-webcat/.QtWebKit /home/nemo/.local/share/harbour-webcat/harbour-webcat/

Then load the gun by removing the three "echo".

for d in `find /home/nemo/.local/share/harbour-* -mindepth 1 -maxdepth 1 \! -newer /`; do dir=`dirname $d`; name=`basename $dir`; rm -rf $dir/$name; mkdir $dir/$name; mv $d $dir/$name/; done
edit flag offensive delete publish link more

Comments

1

Are you sure that this does not move stuff for apps that were not affected?

veskuh ( 2014-01-31 22:05:15 +0300 )edit
4

@veskuh No, not 100% sure, so it's always a good idea to verify the echo output before firing the gun.

pycage ( 2014-01-31 22:16:19 +0300 )edit

@pycage At least on my device this would skip friends and tweetian and that is correct behavior since this issue did not affect those.

veskuh ( 2014-01-31 22:29:03 +0300 )edit

Doesn't this mean that the command would remove the QML directory for good, since it's first transferred to /home/nemo/.local/share/harbour-webcat/harbour-webcat which is on the next row rm -rf:d again?

ZeiP ( 2014-02-01 12:22:11 +0300 )edit

Yes, I think there's a problem with the script when there was more than just one directory in the /home/nemo/.local/share/harbour-myapp/ path. Tidings, for example, had bot QML/ and .QtWebKit there, which means that removing the new settings path would be done twice - once after copying.

ossi1967 ( 2014-02-01 13:34:01 +0300 )edit
8

answered 2014-01-31 20:27:08 +0300

stozze gravatar image

updated 2014-02-01 14:51:43 +0300

Yes it is possible, lets call our app "harbour-myapp". Before the update the offline storage path was:

/home/nemo/.local/share/harbour-myapp/QML/OfflineStorage/Databases

and after update it will be:

/home/nemo/.local/share/harbour-myapp/harbour-myapp/QML/OfflineStorage/Databases

Atleast this is the case on my phone, so to get the settings back we can copy/symlink from old location to new location. But make sure to take a backup of /home/nemo/.local/share/harbour-myapp just in case something goes wrong.

edit flag offensive delete publish link more

Comments

9

A notification about this problem would have been nice tho before applying update..

stozze ( 2014-01-31 20:28:01 +0300 )edit
6

That new path looks awkward. Is this a bug or a feature?

epsilonijk ( 2014-01-31 20:30:10 +0300 )edit

Not sure, but anyhow, atleast the old settings aren't completely lost.

stozze ( 2014-01-31 20:32:56 +0300 )edit

Thx, I'll try as soon as I have SSH access again (=tomorrow). More comfortable that way. Sounds easy enough.

ossi1967 ( 2014-01-31 20:43:40 +0300 )edit
5

Yepp, easy fix, but it should not have happened in the first place imao, kinda critical issue really :/

stozze ( 2014-01-31 20:46:41 +0300 )edit
5

answered 2014-02-03 11:51:20 +0300

thp gravatar image

Some explanation why the path was changed in the first place, why leaving the old things as-is wasn't an option (for architectural and/or time resource reasons) and what app developers and users can do to work around the breakage: http://talk.maemo.org/showpost.php?p=1410600&postcount=76

edit flag offensive delete publish link more
2

answered 2014-02-04 13:02:11 +0300

thp gravatar image

Here's a small utility that helps with carrying out the steps described in pycage's post: http://thp.io/2014/sailfish/harbour-migration-1.0.0-1.noarch.rpm Source code: https://github.com/thp/harbour-migration

Make a backup of ~/.local/share/ first, just in case.

edit flag offensive delete publish link more

Question tools

Follow
11 followers

Stats

Asked: 2014-01-31 20:21:26 +0300

Seen: 2,520 times

Last updated: Feb 04 '14