I will assume that the backup is created using the ola.hallengren script, there is a MaxFileSize
parameter that allows you to set the maximum file size.
As a rule, this is used to speed up the creation of backups, as it allows the use of multi-threaded writing to disk.
The first solution that comes to mind is to spin up an EC2/SQLServer instance, restore the database from the partitions, perform a backup as one file, load one file to S3, restore RDS from one file on S3. But is this really the best option? Is there a more elegant way?
For the situation you described, this seems to be the only possible solution. It is not possible to merge these backup files without restoring them.It is not possible to merge a SQL Server database backup split into several files without restoring it.
A little advice.
In SQL Server 2022In SQL Server 2022 you can backup and restore directly from S3. You can save a little time and free disk space on the intermediate server if you backup the intermediately restored database directly to S3 in one file
BACKUP DATABASE <db-name> TO URL = ' s3://s3.<region-name>.amazonaws.com:443/<backet-name>/<db-name>.bak' WITH COMPRESSION
Instead of making a backup locally and transferring it separately.