This howto allows you to move your entire photo store to a different location, and instruct F-Spot to use this new path without re-importing photos and risking data loss:
QUIT F-SPOT FIRST!!!
1. Move the photo store where you want it to be (if you haven’t done so already!)
2. Back-up your F-Spot database
cp ~/.gnome2/f-spot/photos.db ~/.gnome2/f-spot/photos-backup.db
3. Install and start sqlite
sudo apt-get install sqlite3
sqlite3 ~/.gnome2/f-spot/photos.db
5. Perform an update command against the “photos” table. Make sure you set the paths to match your own
update photos set directory_path = '/NEW/PATH' || substr(directory_path,length('/OLD/PATH/'),length(directory_path)) where directory_path like '/OLD/PATH/%';
Example:
update photos set directory_path = '/home/sean/Pictures/photos' || substr(directory_path,length('/home/sean/Photos/'),length(directory_path)) where directory_path like '/home/sean/Photos/%';
6. Quit sqlite
.quit
From here on, assuming these steps worked, you should be able to start F-Spot and all your photos are still found!
***
If something went wrong, you can revert to the old database by moving the photos back where they were, and running this command:
mv ~/.gnome2/f-spot/photos-backup.db ~/.gnome2/f-spot/photos.db
***
NOTE: F-Spot appears to rebuild it’s thumbnail cache when you start it the first time after doing this, you will notice that all the photos have no images. Leave it for a few minutes and you should find all the photos will eventually flood back into existence.
Thanks to http://nozell.com/blog/2006/07/02/moving-photos-around-behind-f-spots-back/ and http://www.itjungle.com/fhg/fhg040506-story02.html for pointers.
4 June, 2008 at 8:44 am |
There’s an much more easy command:
update photos set uri = replace(uri,’/home/tom/Fotos/’,'/home/tom/Bilder/Fotos/’);
8 December, 2008 at 10:52 am |
Thanks!
This did the trick for me:
update photos set uri = replace(uri,’/home/berend/dsc’,'/home/berend/Photos/dsc’);
16 December, 2008 at 9:13 pm |
You method didn’t actually work for me… I got this error:
SQL error: no such column: directory_pathI suppose it has now change to be ‘uri’.
Using the command suggested in the comments does work, although you have to be careful when copying and pasting from the commands given above. The quotes around the strings are not correct.
To add yet another example of “what worked for me”:
update photos set uri = replace(uri,'/home/craig/Photos','/home/craig/media/photos');11 January, 2009 at 10:55 am |
[...] seanhodges.wordpress.com: this is probably the manual which gives the best guidance but I will see [...]
30 January, 2009 at 10:43 pm |
F-Spot now ships with an extension called ChangePath. As far as I understand it does the same job as what is described above.