Database migration, backup or restore fails with error: Cannot open backup device

Created:

2016-11-16 13:17:00 UTC

Modified:

2017-08-16 16:35:47 UTC

2

Was this article helpful?


Have more questions?

Submit a request

Database migration, backup or restore fails with error: Cannot open backup device

Applicable to:

  • Plesk 11.x for Windows
  • Plesk 12.0 for Windows
  • Plesk 12.5 for Windows

Symptoms

MS SQL databases are not transferred during migration between Windows servers. Or, the backup finishes with warning. The similar error is shown:

Cannot open backup device 'C:\\Program Files\\Parallels\\Plesk\\PrivateTemp\Temp47385.tmp'. Operating system error 5(failed to retrieve text for this error. Reason: 15105).
BACKUP DATABASE is terminating abnormally.

Unable to backup database content. Database databasename_db. Db server .\MSSQL2014:
[Cannot open backup device 'C:\Windows\TEMP\tmp78C9.tmp'. Operating system error 5(Access is denied.).
BACKUP DATABASE is terminating abnormally.]
Cannot open backup device 'C:\Program Files (x86)\Parallels\Plesk\var\modules\panel-migrator\sessions\20170219013856\target-server\mssql-dumps\db_backup_vcvbuilders.com_VCVREAL.sql'. Operating system error 5(Access is denied.).
VERIFY DATABASE is terminating abnormally

Cause

There is no write permissions for the user used by MS SQL instance on a folder from error message .

Resolution

  1. Find MSSQL system current user:

    1. Open Windows' Services
    2. Find MSSQL process
    3. Copy value from column "Log On As"
  2. Grant this user permissions "Read", "Read&Execute", "List directory content", "write" in Security section of on of the following folders (depends on folder shown in error message):
%plesk_dir%\var\modules\panel-migrator\sessions\20170219013856\target-server
%plesk_dir%\var\modules\panel-migrator\sessions\20170219013856\target-server\mssql-dumps\
%plesk_dir%\PrivateTemp

C:\Windows\TEMP
Have more questions? Submit a request
Please sign in to leave a comment.