开发者

Should I back up an SQL database to file or another DB?

I want to run a daily back up of an SQL database. I was thinking I would do this to another DB (primarily to act as a safeguard against my own mistakes or user开发者_运维问答 errors), but all the scripts that I've found do it to a file.

Is it advisable to backup to another database, and if the data's stored as a file on the server, won't having unencrypted data there create a security risk? Is there a good encryption method, should it all be encrypted in the DB? Is there a good script out there for doing this?

Any help would be much appreciated!

Ben


You don't generally backup to another DB. You could mirror the data in another DB, which explains why all the scripts you found deal with files.

You could always store the backups in a secure location, that would make them as secure as a normal DB that is password protected.

Having your DB output to a file is preferred because it becomes much more portable than carting a DB around.


I would recommend backing up to files rather than another DB unless that DB has some form of version control, otherwise you risk copying errors/bad data into the new DB.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜