# Clear db to import a .gpkg

**URL:** <https://gramps.discourse.group/t/clear-db-to-import-a-gpkg/3405>\
**Category:** Help\
**Tags:** data-recovery\
**Created:** [March 14, 2023, 6:27pm UTC](https://gramps.discourse.group/t/clear-db-to-import-a-gpkg/3405 "2023-03-14T18:27:43Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![derFred](https://avatars.discourse-cdn.com/v4/letter/d/ed8c4c/32.png) [@derFred](https://gramps.discourse.group/u/derFred)\
**Post date:** [March 14, 2023, 6:27pm UTC](https://gramps.discourse.group/t/clear-db-to-import-a-gpkg/3405/1 "2023-03-14T18:27:43Z")

</div>

Hi  
gramps Version 5.1.5 - OS Win 10

I want to clean up the installation on my wife’s Win so I can import a `.gpkg` from my Linux machine.  
How do I proceed … I confess - I am a WIN dummy

---

<div class="post-metadata">

**Author:** ![derFred](https://avatars.discourse-cdn.com/v4/letter/d/ed8c4c/32.png) [@derFred](https://gramps.discourse.group/u/derFred)\
**Post date:** [March 14, 2023, 7:04pm UTC](https://gramps.discourse.group/t/clear-db-to-import-a-gpkg/3405/2 "2023-03-14T19:04:04Z")

</div>

sorry for asking …

I found a workaround.  
I created a new db and deleted the old one. 🥸 🕶

---

<div class="post-metadata">

**Author:** ![DaveSch](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/davesch/32/40_2.png) [@DaveSch](https://gramps.discourse.group/u/DaveSch)\
**Post date:** [March 14, 2023, 7:29pm UTC](https://gramps.discourse.group/t/clear-db-to-import-a-gpkg/3405/3 "2023-03-14T19:29:20Z")

</div>

> [@derFred](#):
>
> I found a workaround.

That is not a workaround.

That is what we would have recommended.

---

<div class="post-metadata">

**Author:** ![ennoborg](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/ennoborg/32/4659_2.png) [@ennoborg](https://gramps.discourse.group/u/ennoborg)\
**Post date:** [March 14, 2023, 7:29pm UTC](https://gramps.discourse.group/t/clear-db-to-import-a-gpkg/3405/4 "2023-03-14T19:29:59Z")

</div>

Are you aware of the fact that importing a .gpkg creates a new media folder with the name of the backup file? There’s a chance that it will disappear inside your users folder, where it is out of sight.

---

<div class="post-metadata">

**Author:** ![DaveSch](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/davesch/32/40_2.png) [@DaveSch](https://gramps.discourse.group/u/DaveSch)\
**Post date:** [March 14, 2023, 7:45pm UTC](https://gramps.discourse.group/t/clear-db-to-import-a-gpkg/3405/5 "2023-03-14T19:45:09Z")

</div>

On a windows machine it will be created at:

`C:\Users\%username%\`

---

<div class="post-metadata">

**Author:** ![ennoborg](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/ennoborg/32/4659_2.png) [@ennoborg](https://gramps.discourse.group/u/ennoborg)\
**Post date:** [March 14, 2023, 8:34pm UTC](https://gramps.discourse.group/t/clear-db-to-import-a-gpkg/3405/6 "2023-03-14T20:34:17Z")

</div>

That’s right, and it means that most users won’t see it, because the Documents, Pictures, and other folders sit inside this one, and those are the only folders that you normally see.

---

<div class="post-metadata">

**Author:** ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)\
**Post date:** [March 14, 2023, 9:18pm UTC](https://gramps.discourse.group/t/clear-db-to-import-a-gpkg/3405/7 "2023-03-14T21:18:54Z")

</div>

> [@ennoborg](#):
>
> Are you aware of the fact that importing a .gpkg creates a new media folder with the name of the backup file? There’s a chance that it will disappear inside your users folder, where it is out of sight.

It seems like Media Management is an Enhancement that could be discussed for `.gpkg` imports. It would be useful to have the option to skip Media on import… or to import JUST media… or the ability to specify the destination folder for Media.

Likewise on export, an option to export JUST media and to [split the .tar.gz format of the .gpkg archive](https://www.tecmint.com/split-large-tar-into-multiple-files-of-certain-size/) into manageable segments. Seems like a segmented option (which would always have the tree in the 1st segment and media in following segments) would be a good alternative too.

Note that compression is optional (with [gzip](https://wikipedia.org/wiki/Gzip)) in `.gramps` XML format but mandatory (with [.tar.gz](https://wikipedia.org/wiki/.tar.gz)) in `.gpkg` format.

---

<div class="post-metadata">

**Author:** ![derFred](https://avatars.discourse-cdn.com/v4/letter/d/ed8c4c/32.png) [@derFred](https://gramps.discourse.group/u/derFred)\
**Post date:** [March 15, 2023, 8:06am UTC](https://gramps.discourse.group/t/clear-db-to-import-a-gpkg/3405/8 "2023-03-15T08:06:12Z")

</div>

Thanks,  
But then I can be glad that I found the solution myself 😉

---

<div class="post-metadata">

**Author:** ![ennoborg](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/ennoborg/32/4659_2.png) [@ennoborg](https://gramps.discourse.group/u/ennoborg)\
**Post date:** [March 15, 2023, 1:55pm UTC](https://gramps.discourse.group/t/clear-db-to-import-a-gpkg/3405/9 "2023-03-15T13:55:29Z")

</div>

> [@emyoulation](#):
>
> It seems like Media Management is an Enhancement that could be discussed for `.gpkg` imports. It would be useful to have the option to skip Media on import… or to import JUST media… or the ability to specify the destination folder for Media.

That’s right, and I think that it should be, because the way backups with media are restored now has serious consequences for people that don’t have a feeling for what’s going on under the hood. They end up with all sorts of weird media paths, pointing to files sitting outside the Documents folder that they’re used to on Linux and Windows. I can’t speak for macOS, but I bet it’s the same.

As a developer, I can understand what we have now, where restoring to a path named after the backup file is a sure way to prevent overwriting existing data, but it’s a sure way to create a mess too.

And personally, I always advise to create backups without media, and backup, copy, or move, your media folders using standard means, like cloud services, external drives, etc.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/gramps/original/1X/2ac1e712b7adf612e31ca08a55419f4cf37c0158.png) [@system](https://gramps.discourse.group/u/system)\
**Post date:** [April 14, 2023, 1:55pm UTC](https://gramps.discourse.group/t/clear-db-to-import-a-gpkg/3405/10 "2023-04-14T13:55:42Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
