Cannot restore database to SQL RDS from a S3 bucket due to error

0

I have been trying to restore a small 1GB database to a SQL RDS from a S3 bucket and I am getting the following error:

RESTORE DATABASE successfully processed 946 pages in 0.119 seconds (62.048 MB/sec). [2024-02-05 23:25:22.020] parser.bak: S3 processing >completed successfully [2024-02-05 23:25:22.190]

Aborted the task because of a task failure or a concurrent RESTORE_DB request. [2024-02-05 23:25:22.240] parser.bak: S3 processing has been aborted >[2024-02-05 23:25:22.240] Task has been aborted [2024-02-05 23:25:22.240] The user cannot be remapped to a login. Remapping can only be done for >users that were mapped to Windows or SQL logins. Changed database context to 'master'.

I am using the following script to do the restore:

exec msdb.dbo.rds_restore_database @restore_db_name='Parser_Test', @s3_arn_to_restore_from='arn:aws:s3:::my-datamove-bucket/parser.bak';

Using Exec msdb.dbo.rds_task_status I see the following:

task_id task_type database_name % complete duration(mins) lifecycle

8 RESTORE_DB Parser_Test 0 2 ERROR 7 RESTORE_DB Parser_Test 0 1 ERROR 6 RESTORE_DB Parser_Test 0 2 ERROR 5 RESTORE_DB Parser_Test 0 1 ERROR 4 RESTORE_DB Parser_Test 0 1 ERROR 3 RESTORE_DB Parser_Test 0 0 ERROR

I can't seem to do anything to get past the task failure or a concurrent RESTORE_DB request issue. I have also restarted the RDS instance to make sure nothing was running. Below is the Full error if needed. I would greatly appreciate the help has my Google searches have not proved fruitful. I am using the Admin account and I know it has access to the S3 bucket and the RDS instance.

[2024-02-05 23:24:22.280] Task execution has started. [2024-02-05 23:24:22.553] parser.bak: Completed processing 100% of S3 chunks. [2024-02-05 23:24:22.587] 54 percent processed. [2024-02-05 23:24:22.657] 99 percent processed. [2024-02-05 23:24:22.657] 100 percent processed. [2024-02-05 23:24:22.673] Processed 944 pages for database 'Parser_Test', file 'Parser' on file 1. [2024-02-05 23:24:22.673] Processed 2 pages for database 'Parser_Test', file 'Parser_log' on file 1. [2024-02-05 23:24:23.090] Converting database 'Parser_Test' from version 852 to the current version 869. [2024-02-05 23:24:23.090] Database 'Parser_Test' running the upgrade step from version 852 to version 853. [2024-02-05 23:24:23.090] Database 'Parser_Test' running the upgrade step from version 853 to version 854. [2024-02-05 23:24:23.090] Database 'Parser_Test' running the upgrade step from version 854 to version 855. [2024-02-05 23:24:23.103] Database 'Parser_Test' running the upgrade step from version 855 to version 856. [2024-02-05 23:24:23.103] Database 'Parser_Test' running the upgrade step from version 856 to version 857. [2024-02-05 23:24:23.103] Database 'Parser_Test' running the upgrade step from version 857 to version 858. [2024-02-05 23:24:23.103] Database 'Parser_Test' running the upgrade step from version 858 to version 859. [2024-02-05 23:24:23.103] Database 'Parser_Test' running the upgrade step from version 859 to version 860. [2024-02-05 23:24:23.103] Database 'Parser_Test' running the upgrade step from version 860 to version 861. [2024-02-05 23:24:23.103] Database 'Parser_Test' running the upgrade step from version 861 to version 862. [2024-02-05 23:24:23.120] Database 'Parser_Test' running the upgrade step from version 862 to version 863. [2024-02-05 23:24:23.120] Database 'Parser_Test' running the upgrade step from version 863 to version 864. [2024-02-05 23:24:23.120] Database 'Parser_Test' running the upgrade step from version 864 to version 865. [2024-02-05 23:24:23.120] Database 'Parser_Test' running the upgrade step from version 865 to version 866. [2024-02-05 23:24:23.140] Database 'Parser_Test' running the upgrade step from version 866 to version 867. [2024-02-05 23:24:23.140] Database 'Parser_Test' running the upgrade step from version 867 to version 868. [2024-02-05 23:24:23.140] Database 'Parser_Test' running the upgrade step from version 868 to version 869. [2024-02-05 23:24:23.140] RESTORE DATABASE successfully processed 946 pages in 0.119 seconds (62.048 MB/sec). [2024-02-05 23:25:22.020] parser.bak: S3 processing completed successfully [2024-02-05 23:25:22.190] Aborted the task because of a task failure or a concurrent RESTORE_DB request. [2024-02-05 23:25:22.240] parser.bak: S3 processing has been aborted [2024-02-05 23:25:22.240] Task has been aborted [2024-02-05 23:25:22.240] The user cannot be remapped to a login. Remapping can only be done for users that were mapped to Windows or SQL logins. Changed database context to 'master'.

2 Answers
0

Your key is the final statement where "Remapping can only be done for users that were mapped to Windows or SQL logins. Changed database context to 'master'." Whatever user you are referencing in the script has changes or the name is not valid. I may be wrong but just trying to assist. I know for restores and backsups of MSSQL and RDS a option group was required to may to the s3 to perform a backup and restore although it has limitations.

Ahren
answered a month ago
  • I tired removing all users except one and restore it, but got the same error.

0

The error "The user cannot be remapped to a login. Remapping can only be done for users that were mapped to Windows or SQL logins." is generated when mapping a contained user to a login.

If you already have a contained user in the database that has the same name as your login that is restoring the database you would get this error. Maybe you removed all users except the one that should have been removed.

AWS
answered a month ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions