Quantcast
Channel: Red Gate forums: SQL Backup 7
Viewing all articles
Browse latest Browse all 713

How to restore encrypted backups?

$
0
0
I posted this question few minutes ago in a discontinued forum and then realized my mistake. So, posting in the correct forum now.


I am having some issues with the restore command when trying to restore encrypted backup. This is what I ran to take a backup:

EXECUTE master..sqlbackup N'-SQL "BACKUP DATABASE AjayDB TO DISK = ''Z:\WrkFolder\AjayDB_201304011011_full.bak'' WITH COMPRESSION = 1, THREADCOUNT = 4, KEYSIZE = 256, PASSWORD = ''<ENCRYPTEDPASSWORD>abc12defLHG</ENCRYPTEDPASSWORD>''"'


Now, when I try to restore it via GUI, I supply the same password as above: abcd12defLHG. But it says: bad password. I tried to do it thru script as well, but did not help. I tried both of the following commands - none helped.

EXECUTE master.dbo.sqlbackup N'-SQL "RESTORE DATABASE [AjayDB] FROM DISK = ''Z:\WrkFolder\AjayDB_201304011011_full.bak'' WITH DISCONNECT_EXISTING, PASSWORD = ''abc12defLHG'', REPLACE, MOVE ''AjayDB'' TO ''Z:\WrkFolder\AjayDB.mdf'', MOVE ''AjayDB_log'' TO ''Z:\WrkFolder\AjayDB.ldf'', RECOVERY"'

EXECUTE master.dbo.sqlbackup N'-SQL "RESTORE DATABASE [AjayDB] FROM DISK = ''Z:\WrkFolder\AjayDB_201304011011_full.bak'' WITH DISCONNECT_EXISTING, PASSWORD = ''<ENCRYPTEDPASSWORD>abc12defLHG</ENCRYPTEDPASSWORD>'', REPLACE, MOVE ''AjayDB'' TO ''Z:\WrkFolder\AjayDB.mdf'', MOVE ''AjayDB_log'' TO ''Z:\WrkFolder\AjayDB.ldf'', RECOVERY"'


This is the msg generated:

SQL Backup v7.0.6.2
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Restoring AjayDB (database) from:
Z:\WrkFolder\AjayDB_201304011011_full.bak

Error 710: Wrong password entered.

SQL Backup exit code: 710

(6 row(s) affected)

name value
---------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
exitcode 710
sqlerrorcode 0
filename001 Z:\WrkFolder\AjayDB_201304011011_full.bak

(3 row(s) affected)




Can you help?

Thanks.
Ajay

Viewing all articles
Browse latest Browse all 713

Trending Articles