Skip to content

Instantly share code, notes, and snippets.

@aleskiontherun
Last active February 19, 2024 15:31
Show Gist options
  • Save aleskiontherun/c4cba180c61707ec208b7ca8766f686b to your computer and use it in GitHub Desktop.
Save aleskiontherun/c4cba180c61707ec208b7ca8766f686b to your computer and use it in GitHub Desktop.
Backup and restore Pritunl database.
sudo service pritunl stop
mongodump -d pritunl -o pritunl-bkp
tar -czvf pritunl-bkp.tar.gz pritunl-bkp
sudo service pritunl stop
mongo pritunl --eval 'db.dropDatabase()'
tar -xzf pritunl-bkp.tar.gz
mongorestore -d pritunl ./pritunl-bkp/pritunl/
sudo service pritunl start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment