# Data rescue from a Rocket.Chat installation with broken snap

**URL:** <https://forums.rocket.chat/t/data-rescue-from-a-rocket-chat-installation-with-broken-snap/2373>\
**Category:** Community Support\
**Created:** [November 1, 2018, 5:57am UTC](https://forums.rocket.chat/t/data-rescue-from-a-rocket-chat-installation-with-broken-snap/2373 "2018-11-01T05:57:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tamasgal](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/tamasgal/32/4513_2.png) [@tamasgal](https://forums.rocket.chat/u/tamasgal)\
**Post date:** [November 1, 2018, 5:57am UTC](https://forums.rocket.chat/t/data-rescue-from-a-rocket-chat-installation-with-broken-snap/2373/1 "2018-11-01T05:57:51Z")

</div>

I am fighting with snapd since yesterday… Long story short: snap is broken, I am not able to start the caddy, the rocketchat-server or the mongo database and I have not a single manual backup. (I was so naive that I thought those are created automatically). If someone is interested, here is my desperate call for help regarding the snap installation: [https://forum.snapcraft.io/t/snap-is-broken-cannot-perform-operation-mount-bind-snap-core-current-etc-alternatives/8253](https://forum.snapcraft.io/t/snap-is-broken-cannot-perform-operation-mount-bind-snap-core-current-etc-alternatives/8253)

Now I have only the files on the machine (and a full system backup of 4 weeks, but none of them with a working snap, it seems that the issue was there for a long time and only revealed when I did a system update).

My question: how can I rescue the data of Rocket.Chat and feed it into a fresh installation? As far as I understood everything is stored under `/var/snap`, but where is the actual mongo database file, or how can I make a valid backup archive, which is recognised by Rocket.Chat?

---

<div class="post-metadata">

**Author:** ![tamasgal](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/tamasgal/32/4513_2.png) [@tamasgal](https://forums.rocket.chat/u/tamasgal)\
**Post date:** [November 4, 2018, 12:45am UTC](https://forums.rocket.chat/t/data-rescue-from-a-rocket-chat-installation-with-broken-snap/2373/2 "2018-11-04T00:45:52Z")

</div>

Alright, I got it back to live and everything seems to work. I still cannot believe it.

The procedure was the following:

- install a fresh new Xen container (on fresh virtual disks) with debian jessie
- update all the packages to the latest versions
- do a full dist upgrade to debian stretch
- install snap with `apt` (and other related packages like apache2, letsencrypt…)
- copy over /var/snap/rocketchat-server/common from the system backup to the new server (same location)
- copy over individual configuration files (apache reverse proxy configuration, letsencrypt, etc.)
- `snap install rocketchat.server`
- everything works. reboot to make sure it comes back and enjoy

All in all the solution is quite straight forward and I almost regret that I spent so much time and effort to make this work under the same system (Debian Jessie). I guess the biggest show blocker was the fact that at some point they removed `snapd` from the jessie-backports (which I learned the hard way when I tried to reinstall it), so I simply wasn’t able to restore a working snap installation. But whatever…
