开发者

Backup database and remove sensitive data

I'm looking at backup routine which allows our production database to be backed up with sensitive data stripped out of certain columns within the database to be exported to our testing server.

The routine shou开发者_运维百科ld require the least human intervention and hopefully just be a simple customisable SQL script without taking the production database offline.

Database server is SQL Server 2008.


I've run into similar requirements before, and the only sure solution I know of is to use a copy of your production database. You can mask/delete data on the copy and run backups from there. Yes it's ugly and a waste of resources, but to date I haven't found a solid alternative for this particular problem.

As for the copy method, you do have some options:

  • Replication
  • Scheduled DB copy
  • Backup/restore from production

So while I admit this solution is pretty cringe-worthy, it can be automated and serve your purposes. If you can find productive uses for the database copy that don't require your deleted information (e.g. reports, testing, development) then this can actually be a less-than-terrible solution. It can be a nice security boon to have a slightly out-of-date version of your production database with sensitive data removed.


If you want to take a backup then Just type

BACKUP DATABASE Dbname

If you want to specify offline or anything else then you can do it. The backup file will generate on the default path of the SQL SERVER 2008.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜