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.
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
I have a MariaDb 10.1.34 instance on AWS RDS. This instance has among other things root user with appropriate permissions.
I upgraded the instance to use 10.2.21 version of the MariaDB and wanted to execute mysql_upgrade as suggested in offical upgrade document.
However I always get this error:
Got error: 1045: Access denied for user 'root'#'<instanceip>' (using password: YES) when trying to connect
Using the exact same credentials I can connect to the database using mysql cli but no mysql_upgrade or mysqlcheck.
So this works:
mysql --user=root --password=<pwd> --host=<hosturl> --port=3306 --protocol=tcp
And this does not:
mysql_upgrade --user=root --password=<pwd> --host=<hosturl> --port=3306 --protocol=tcp
SHOW GRANTS FOR root; gives this output:
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, PROCESS, REFERENCES, INDEX,
ALTER, SHOW DATABASES, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE,
REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER,
EVENT, TRIGGER ON *.* TO 'root'#'%' IDENTIFIED BY PASSWORD '<sometext>' WITH GRANT OPTION
Any ideas?
To save time to to anybody trying to do the same thing - don't.
The behavior I encountered is by AWS design. mysql_upgrade is already executing during the instance upgrade process internally.
(Source for this statement)
I am executing a script on my EC2 Instances that will automatically restore databases. If I remote into the instance and manually execute the same ps1 script, it works. All SQL services are running. But if I execute it from Systems manager I get the error:
Restore-SqlDatabase : Failed to connect to server (localdb)\MSSQLLocalDB.
Any clue as to what could be causing this or steps to take to debug this issue? Thanks.
PS1 Script:
Restore-SqlDatabase -ServerInstance "(localdb)\MSSQLLocalDB" -Database "db" -BackupFile C:\path.bak -AutoRelocateFile
Check that the SSM agent on the instance is up to date and double check if any extra instance permissions are needed to allow SSM to restore the databases. I'm not 100% what/how the SSM works but certainly having the agent up to date and double checking permissions are always a good place to start.
I am new to aws.In AWS - RDS services we are running 2 instances. Suddenly it went to stop mode whenever there is any updates or patchings happens from AWS-ends.
Can Anyone assist me is there any possible way to start it again when it goes to stop mode.
Actually This Database instance should be in start/running mode otherwise, our application won't work.
An Amazon RDS instance will normally be running continuously.
You can Stop an Amazon RDS DB Instance Temporarily - Amazon Relational Database Service, but this requires that you specifically request that the database stop.
You could look through your AWS CloudTrail logs to see if another user requested that the database be stopped.
So, rather than worrying about how to start it in future, you should look into determining why it stopped. You can configure IAM permissions to remove the ability for users to stop the RDS database in future.
Is there any way to start an AWS Database Migration Service full-load-and-cdc replication task through Terraform? Preferably, this would start automatically upon creation of the task.
The AWS DMS console provides an option to "Start task on create", and the AWS CLI provides a start-replication-task command, but I'm not seeing similar options in the Terraform resources. The aws_dms_replication_task provides the cdc_start_time argument, but I think this may apply only to cdc tasks. I've tried setting this argument to a number of past/current/future timestamps with my full-load-and-cdc replication task, but the task never started (it was merely created and entered the ready state).
I'd be glad to log a feature request to Terraform if this feature is not supported, but wanted to check with the community first to see if I was overlooking an existing way to do this today.
(Note: This question has also been logged to the Terraform Google group.)
I've logged an issue for this feature request:
Terraform AWS Provider #2083: Support Starting AWS Database Migration Service Replication Task
I have a server that starts and stops on a daily basis. We take AMIs of this server regularly. I want the AMIs to execute UserData on service start, but unless I remember to enable this option manually in 'Ec2 Service Properties' then any servers created from the AMI will not run the UserData script.
How can I set this flag so that it is always enabled?
There is a config file at C:\Program Files\Amazon\Ec2ConfigService\Settings\config.xml. You can enable it there when you create the AMI.