On Wednesday I came across a question in MSDN. The user had a .safe file located on one of the servers and was not sure how to read that file.
The .safe files are created by the Idera SQL Safe backup utility. This tool takes the SQL Server database backup and stores it as .safe file. When compared to the native SQL database backup, .safe files have good compression ratio. Also these files are encrypted using the password passed on to the utility while initiating the database backup.
Now we know that .safe files contain SQL Server database backup, the only way to *read* it is by restoring it. SQL Safe backup utility can be used to restore these files. What if the SQL Safe utility is not installed on the server. Is there a way to convert .safe files into native SQL Server database backup format (.bak)? The Idera SQL Safe backup comes with a tool called SafeToSQL. This tool can be used to uncompress and decrypt the .safe files and convert them to .bak files (the file extension is irrelevant).
Here is how it works. The SafeToSQL.exe is located in SafeToSQL folder under the folder in which the SQL Safe Backup software is installed.
SafeToSQL [sourcebackupfile.safe] -password [TheSafePassword]
The output of this command would look like the one below.
This tool comes in very handy in an environment where the Production databases are backed up using SQL Safe Backup and the non-production instances do not have this tool installed.