# Get Backup

**URL:** <https://forum.pritunl.com/t/get-backup/1398>\
**Category:** Pritunl VPN\
**Created:** [September 22, 2023, 7:31pm UTC](https://forum.pritunl.com/t/get-backup/1398 "2023-09-22T19:31:54Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![X-UIP](https://forum.pritunl.com/user_avatar/forum.pritunl.com/x-uip/32/583_2.png) [@X-UIP](https://forum.pritunl.com/u/X-UIP)\
**Post date:** [September 22, 2023, 7:31pm UTC](https://forum.pritunl.com/t/get-backup/1398/1 "2023-09-22T19:31:54Z")

</div>

Hello,  
How can I make a backup of The Pritunl? Does this backup include all user profiles and settings?

---

<div class="post-metadata">

**Author:** ![zach](https://forum.pritunl.com/user_avatar/forum.pritunl.com/zach/32/1105_2.png) [@zach](https://forum.pritunl.com/u/zach)\
**Post date:** [September 23, 2023, 1:38am UTC](https://forum.pritunl.com/t/get-backup/1398/2 "2023-09-23T01:38:48Z")

</div>

The [**backup documentation**](https://docs.pritunl.com/docs/backup) has information on backing up the database.

---

<div class="post-metadata">

**Author:** ![X-UIP](https://forum.pritunl.com/user_avatar/forum.pritunl.com/x-uip/32/583_2.png) [@X-UIP](https://forum.pritunl.com/u/X-UIP)\
**Post date:** [September 24, 2023, 3:58pm UTC](https://forum.pritunl.com/t/get-backup/1398/3 "2023-09-24T15:58:08Z")

</div>

Thank you so much, but I don’t know yet, what should I do for getting back up and how can restore it. there are two kinds of commands for getting back up, can you tell me what should i do step by step? and that in during getting backup my server and client Don’t they get into trouble?

---

<div class="post-metadata">

**Author:** ![zach](https://forum.pritunl.com/user_avatar/forum.pritunl.com/zach/32/1105_2.png) [@zach](https://forum.pritunl.com/u/zach)\
**Post date:** [September 29, 2023, 2:50pm UTC](https://forum.pritunl.com/t/get-backup/1398/4 "2023-09-29T14:50:45Z")

</div>

The first commands backup the system and the second commands restore it. The MongoDB documentation has more information on the usage of the commands.

---

<div class="post-metadata">

**Author:** ![X-UIP](https://forum.pritunl.com/user_avatar/forum.pritunl.com/x-uip/32/583_2.png) [@X-UIP](https://forum.pritunl.com/u/X-UIP)\
**Post date:** [October 1, 2023, 7:31pm UTC](https://forum.pritunl.com/t/get-backup/1398/5 "2023-10-01T19:31:00Z")

</div>

Hello,

> Export and Restore Configuration

```auto
sudo pritunl get-mongodb
mongodb://localhost:27017/pritunl
sudo pritunl set-mongodb mongodb://localhost:27017/pritunl

sudo pritunl get-host-id
3d6bb90b269fd80073c28a352f0de983
sudo pritunl set-host-id 3d6bb90b269fd80073c28a352f0de983

```

This is the code! So tell me when I run command one, the backup will be saved on my hdd? I mean, where exactly is the backup stored?

---

<div class="post-metadata">

**Author:** ![cesar](https://forum.pritunl.com/user_avatar/forum.pritunl.com/cesar/32/725_2.png) [@cesar](https://forum.pritunl.com/u/cesar)\
**Post date:** [January 31, 2024, 1:39pm UTC](https://forum.pritunl.com/t/get-backup/1398/7 "2024-01-31T13:39:30Z")

</div>

Hey,

These commands don’t make the backups, only show your mongodb url and the host-id.

You only need to backup the mongo database to save the entire configuration.

```bash
# make backuo
mongodump --db=pritunl
# zip file
tar cf pritunldb.tar dump

# unzip file
tar xf pritunldb.tar
# restore
mongorestore dump

```

And yes, its saved on your disk.
