Home > Software engineering >  Cannot create SQL RDS native backup
Cannot create SQL RDS native backup

Time:08-25

I am trying to create RDS database backup to s3 backup using native backup:

 exec msdb.dbo.rds_backup_database
 @source_db_name='db_name',
 @s3_arn_to_backup_to='my_s3_arn/db_name.bak',
 @overwrite_s3_backup_file=1;

After executing, I get this error from task status info:

Task execution has started. Aborted the task because of a task failure or an overlap with your preferred backup window for RDS automated backup.
Task has been aborted The provided token has expired.

CodePudding user response:

The error info is saying that your token has expired. This is the token of the role which is used to create native backups(SQLSERVER_BACKUP_RESTORE option). This shouldn't happen normally.

Try these options and after each one check if you can create the native backup:

  • Reboot your database instance
  • Stop/Start your database instance
  • Recreate the option for the native backups
  • Recreate the entire option group

The last option is the one that fixed the problem when I tested revoking the role sessions.

  • Related