# DB-backups publiceren zonder privé-informatie van gebruikers bloot te leggen

**URL:** <https://meta.discourse.org/t/publishing-db-backups-without-exposing-users-private-information/177175>\
**Category:** Product Support\
**Created:** [25 januari 2021 om 15:14 UTC](https://meta.discourse.org/t/publishing-db-backups-without-exposing-users-private-information/177175 "2021-01-25T15:14:20Z")\
**Posts on this page:** 1\
**Showing post:** 12

<div class="post-metadata">

**Author:** ![lucasbasquerotto](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lucasbasquerotto/32/133376_2.png) [@lucasbasquerotto](https://meta.discourse.org/u/lucasbasquerotto)\
**Post date:** [5 februari 2021 om 16:30 UTC](https://meta.discourse.org/t/publishing-db-backups-without-exposing-users-private-information/177175/12 "2021-02-05T16:30:16Z")

</div>

If you want to keep the email/password login, but in a way that anyone can enter the account of any user **in the backup’ed database** , you may achieve that generating an email based on the username for every user, like `<username>@email.invalid`.

For passwords and logins, assuming that discourse uses encrypted passwords with salts (I haven’t looked, but I assume so), you can define a password like `123456` (in your live database), see in the database the resulted encrypted password as well as the salt (then change your password back, or do it in a fake account), then run an instruction in the new (cloned) database to define the encrypted passwords and salts of every user to the values you saw before (every user will have the same encrypted password as well as the salt, and, consequently, the same password, the one you used before), so for a user `foo`, you could login with the email `foo@email.invalid` and password `123456`.

Other than that, you might want to delete the private messages (if they are not needed), because they may have sensitive data.

And finally, it’s good to take a look for fields that may have confidential data, like the (admin) settings.

---

_[View the full topic](https://meta.discourse.org/t/publishing-db-backups-without-exposing-users-private-information/177175)._
