Quantcast

Backup Migration, no pictures showing, media path wrong

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Backup Migration, no pictures showing, media path wrong

pjwk
I was moving my backup (with pictures and sources) of Gramps from one Ubuntu PC 1 to another Ubuntu PC 2. My home folder has another name in PC 2 (name2).

Under Edit -> Preferences -> General, I changed the media path (/home/name2/genealogy/) but unfortunately all pictures in Gramps are not showing any longer.

Why does this happen? Did I oversee something?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Backup Migration, no pictures showing, media path wrong

Douglas Bainbridge
On 05/06/14 14:18, pjwk wrote:
> I was moving my backup (with pictures and sources) of Gramps from one Ubuntu
> PC 1 to another Ubuntu PC 2. My home folder has another name in PC 2
> (name2).
>
> Under Edit -> Preferences -> General, I changed the media path
> (/home/name2/genealogy/) but unfortunately all pictures in Gramps are not
> showing any longer.
>
> Why does this happen? Did I oversee something?
The first thing that springs to mind is that your media
paths on PC1 are absolute, so that the media on PC2 will
still be looked for in /home/PC1/genealogy.
If so, on PC1 run Tools=>Utilities=>Media
Manager=>Forward=>Convert paths from absolute to relative.
Then make your backup.
Then on PC2, Edit -> Preferences........ ought to work, at
least with jpg files.
(Note: There's a reported bug in the recognition of PNG
files.  You have to add them individually)

HTH

Doug


------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Backup Migration, no pictures showing, media path wrong

enno
In reply to this post by pjwk

> I was moving my backup (with pictures and sources) of Gramps from one Ubuntu
> PC 1 to another Ubuntu PC 2. My home folder has another name in PC 2
> (name2).
>
> Under Edit -> Preferences -> General, I changed the media path
> (/home/name2/genealogy/) but unfortunately all pictures in Gramps are not
> showing any longer.
>
> Why does this happen? Did I oversee something?
Yes, long ago. The media path only helps when you store your media with
relative paths, which is something you probably haven't done. I don't
know if there is a default for that.

You can reconnect them through one of the check and repair tools, or
hack the Gramps XML, whatever suits you best.

regards,

Enno


------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Backup Migration, no pictures showing, media path wrong

pjwk
Thank you for your reply, guys.

Given the fact that PC1 is not reachable for me in the next month, can you, Enno, give me a hint where to find the aforementioned gramps.xml, please?

I found the following xml, but I do no think there are the one you intended.

locate gramps.xml
/home/PC2/.gramps/recent-files-gramps.xml
/usr/share/mime/application/x-gramps.xml
/usr/share/mime/packages/gramps.xml

Or do you mean the gramps.ini?

Best regards,
Sebastian
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Backup Migration, no pictures showing, media path wrong

enno
Sebastian,
> Given the fact that PC1 is not reachable for me in the next month, can you,
> Enno, give me a hint where to find the aforementioned gramps.xml, please?
Gramps XML, without the dot, is what you find when you unpack a .gramps
or .gpkg file with gunzip. Editing that XML is like a last resort, and I
mentioned that before I read Doug's advice.

After reading that, I recommend to use the media manager. It has an
option to replace strings in the path, so it should be easy to replace
/home/name1 with /home/name2, and then run the conversion to relative
paths. By doing the replace first, you don't need PC1 for this.

regards,

Enno


------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Backup Migration, no pictures showing, media path wrong

Douglas Bainbridge
On 05/06/14 21:59, Enno Borgsteede wrote:

> Sebastian,
>> Given the fact that PC1 is not reachable for me in the next month, can you,
>> Enno, give me a hint where to find the aforementioned gramps.xml, please?
> Gramps XML, without the dot, is what you find when you unpack a .gramps
> or .gpkg file with gunzip. Editing that XML is like a last resort, and I
> mentioned that before I read Doug's advice.
>
> After reading that, I recommend to use the media manager. It has an
> option to replace strings in the path, so it should be easy to replace
> /home/name1 with /home/name2, and then run the conversion to relative
> paths. By doing the replace first, you don't need PC1 for this.
>
> regards,
>
> Enno
Yes, indeed.

In PC2:
Tools=> Utilities=> Media Manager=> Replace substrings in
the path=> Forward=>
Then enter "/home/PC1" (without quotes) in Replace:
and "/home/PC2" (without quotes) in With:
=>Forward.
(If I remember rightly you get shown a list of proposed
changes to accept or select - accept all).
For the future you'll  probably find it more convenient to
go on and change the media paths to relative as well.

regards,

Doug

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Backup Migration, no pictures showing, media path wrong

pjwk
Thank you very much for your replies! It worked out! :)
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Backup Migration, no pictures showing, media path wrong

pjwk
Argh, I made a mistake and messed it up now (see screenshot). How can I come out of the situation? :/

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Backup Migration, no pictures showing, media path wrong

Douglas Bainbridge
On 06/06/14 16:19, pjwk wrote:
> Argh, I made a mistake and messed it up now (see screenshot). How can I come
> out of the situation? :/
>
> <http://gramps.1791082.n4.nabble.com/file/n4666125/59.png>
>
>
>
<snip>

Not sure.
I'd check first how much of a mess-up you have.
If you go to Media View and look at the list of media, what
sort of Path do you see? (If the Path column isn't
displayed, click on the 'Configure the active view' icon and
enable Path).
Can you give us examples?

Doug

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Backup Migration, no pictures showing, media path wrong

enno
In reply to this post by pjwk
> Argh, I made a mistake and messed it up now (see screenshot).
> How can I come out of the situation? :/

Let me ask first, how did you get into it? What type of replace command did
you give? What strings?

Assuming that there is no bug in this part of Gramps, it must be something
you did.

Do you have the old database anywhere? Backup maybe?

regards,

Enno


------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Backup Migration, no pictures showing, media path wrong

pjwk
Yes, I take the blame for that mess. This was not caused by a bug!

An example media path is the following:
/home/sebastian/Stammbaum/home/sebastian/Stammbaum/A/home/sebastian/Stammbaum/l/home/sebastian/Stammbaum/b/home/sebastian/Stammbaum/e/home/sebastian/Stammbaum/r/home/sebastian/Stammbaum/t/home/sebastian/Stammbaum/-/home/sebastian/Stammbaum/G/home/sebastian/Stammbaum/o/home/sebastian/Stammbaum/t/home/sebastian/Stammbaum/t/home/sebastian/Stammbaum/f/home/sebastian/Stammbaum/r/home/sebastian/Stammbaum/i/home/sebastian/Stammbaum/e/home/sebastian/Stammbaum/d/home/sebastian/Stammbaum/-/home/sebastian/Stammbaum/N/home/sebastian/Stammbaum/e/home/sebastian/Stammbaum/u/home/sebastian/Stammbaum/m/home/sebastian/Stammbaum/a/home/sebastian/Stammbaum/n/home/sebastian/Stammbaum/n/home/sebastian/Stammbaum/_/home/sebastian/Stammbaum/s/home/sebastian/Stammbaum/c/home/sebastian/Stammbaum/h/home/sebastian/Stammbaum/u/home/sebastian/Stammbaum/l/home/sebastian/Stammbaum/z/home/sebastian/Stammbaum/e/home/sebastian/Stammbaum/i/home/sebastian/Stammbaum/t/home/sebastian/Stammbaum/-/home/sebastian/Stammbaum/0/home/sebastian/Stammbaum/3/home/sebastian/Stammbaum/home/sebastian/Stammbaum/j/home/sebastian/Stammbaum/p/home/sebastian/Stammbaum/g/home/sebastian/Stammbaum

I think, the mistake I did was that, the first times I tried to change the path, I left empty the field for the media path to substitute. I think the only way is to find all variations of this long path in the media view and copy 'n paste it in the "media path converter" tool.

I'll do that tomorrow and report if I got out of that mess.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Backup Migration, no pictures showing, media path wrong

Douglas Bainbridge
On 06/06/14 20:34, pjwk wrote:

> Yes, I take the blame for that mess. This was not caused by a bug!
>
> An example media path is the following:
>
> I think, the mistake I did was that, the first times I tried to change the
> path, I left empty the field for the media path to substitute. I think the
> only way is to find all variations of this long path in the media view and
> copy 'n paste it in the "media path converter" tool.
>
> I'll do that tomorrow and report if I got out of that mess.

pjwk, I think it may get a bit tricky and may be worth
trying to avoid it.

As an alternative:
I presume you've still got the gpkg file you used to set up
the family tree on your second PC.
It may cause you less trouble to just create another Family
Tree on PC2 (Family Trees=> Manage Family Trees=>New (any
old name)=> Load) and Import the gpkg all over again.
(You may need to delete gpkg.media from /home/PC2 first if
Import complains).
You can then delete the previous tree in Manage Family Trees
and rename the new tree to the previous name.
Then try again with the Replace substrings tool.

Let us know how you get on.

Doug

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
Loading...