Back up only the settings

No.

There is no etc.

It exports

  • settings
  • admin users
  • groups
  • categories
  • tags/tag groups
  • themes/theme components/settings

Even if you trust your devs there can be regulations (like GDPR) that forbid you to share personal information with people outside a certain jurisdiction or that require you to minimize the amount of personal information that is copied to another system. Additionally, a development or staging server runs untested software which might contain security issues.

We always run something like this on the staging server immediately after restoring the backup from production, which anonymizes all users except staff and those in the testusers group.

keep_groups = Group.where(name: ['staff', 'testusers']).pluck(:id)
acting_user = User.find(-1)
User.all.each do |u|
  next if u.in_any_groups? keep_groups
  user = UserAnonymizer.new(u, acting_user).make_anonymous
end
5 Likes