# שחזור גיבוי למופע מקומי בצורה בטוחה/אנונימית

**URL:** <https://meta.discourse.org/t/restore-backup-to-a-local-instance-in-a-safe-anonymized-way/191128>\
**Category:** Product Support\
**Created:** [20 במאי,‏ 2021,‏ 9:43pm UTC](https://meta.discourse.org/t/restore-backup-to-a-local-instance-in-a-safe-anonymized-way/191128 "2021-05-20T21:43:48Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)\
**Post date:** [20 במאי,‏ 2021,‏ 9:59pm UTC](https://meta.discourse.org/t/restore-backup-to-a-local-instance-in-a-safe-anonymized-way/191128/2 "2021-05-20T21:59:57Z")

</div>

Run this from a rails console to anonymize all users except staff:

```
acting_user = User.find(-1)
User.all.each do |u|
  next if u.staff? 
  user = UserAnonymizer.new(u, acting_user).make_anonymous
end

```

---

_[View the full topic](https://meta.discourse.org/t/restore-backup-to-a-local-instance-in-a-safe-anonymized-way/191128)._
