MSG 3059 this backup or restore command is not supported on a database mirror or secondary replica

Source: Internet
Author: User

After configuring the 2012 alwayson High Availability group, I want to experience the new features of backup in the secondary database. Back up the backup on the secondary server, which can reduce the load on the primary server (a very good improvement, the databasemirroring secondary database is not accessible in the past ).

However, an error is reported during Backup:

 

Backup databasetesttodisk
= 'C: \ test. Bak'

 

MSG 3059, level 16, state 1, line 2

This backup or restore command is not supported ona database mirror or secondary replica.

MSG 3013, level 16, state 1, line 2

Backup database is terminating abnormally.

 

I checked Microsoft's website and found that there are restrictions and limitations on backup of secondary servers:

 

· Secondary copies only support backup log. Backup database only supports full backup for databases, files, or file groups. Secondary copies do not support differential backup.

Note:

Copying backups only does not affect the log chain. Likewise, copying backups only does not clear the difference bitmap.

· To back up the secondary database, the secondary copy must be able to communicate with the primary copy and be in the synchronized or synchronizing state.

· Configure the availability group to support secondary copy backup and create backup preferences only for the locations where the backup is to be performed.

 

The script is successfully backed up with the copy_only option:

 

Backup databasetesttodisk
= 'C: \ test. Bak' withcopy_only

 

Processed 328 pages for database 'test', file 'test' on file 1.

Processed 1 pages for database 'test', file 'test _ log' on file 1.

Backup database successfully processed 329 pages in0.140 seconds (18.327 MB/sec ).

The copy_only option is not required for log backup:

 

Backup log
Test to disk = 'C: \ test. trn'

Reference: http://msdn.microsoft.com/zh-cn/library/hh710053.aspx

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.