Unable to restore SQL Server bak file from S3, says file too large

Casper

I'm trying to run a restore query from a bak file stored in S3 bucket to an RDS SQL Server Web edition, and kept getting this error:

[2017-09-13 20:30:22.227] Aborted the task because of a task failure or a concurrent RESTORE_DB request. [2017-09-13 20:30:22.287] There is not enough space on the disk to perform restore database operaton.

The bak file is 77 GB and the DB has 2TB, how come this is still not enough?

This is the query from AWS docs:

exec msdb.dbo.rds_restore_database 
        @restore_db_name='database_name', 
        @s3_arn_to_restore_from='arn:aws:s3:::bucket_name/file_name_and_extension';

Source: http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/SQLServer.Procedural.Importing.html#SQLServer.Procedural.Importing.Native.Using

sepupic

There is not enough space on the disk to perform restore database operaton.

...

The bak file is 77 GB and the DB has 2TB, how come this is still not enough?

You need 2Tb of space to be able to restore this backup.

The fact is that restore operation will reconstruct your original database that is 2Tb.

Backup is backing up only data, not empty space. If your backup is only 77Gb and is not compressed this means that your original database has only 77Gb of data (or even less, because backup contains a certain amout of log as well).

Any database consists of data file(s) and log file(s), and if your db is about 2Tb with only 77Gb of data, it means it has enormous log file. I think it's in full recovery model and someone does not take regular log backups (or even did not take any log backup at all!!)

So you should take a look at your original db, change recovery model to simple if you don't need point in time recovery and take no log backups, or, if you really need full recovery model, you should backup log more frequently.

Taking regular log backups or changing recovery model to simple will permit you to shrink the log to reasonable size, from that moment you will not need 2Gb of space to restore it anymore

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

RESTORE .bak-file from c:\users\ directories on SQL Server

From Dev

MS-SQL on Ubuntu: unable to restore database.bak file

From Dev

Restore Database from bak file

From Dev

How to restore a SQL Server 2012 database .bak file in C#?

From Dev

script to restore database sql server from bak file, doesn't work

From Dev

Restore a bak file which is more than 3 GB on a SQL Server 2017 Express edition getting error

From Dev

Restore a backup file on AWS RDS SQL Server from S3 bucket

From Dev

Restore selected tables from .bak file

From Dev

SQL Server says data is too large for column?

From Dev

How to restore a SQL Backup .bak file on a different (new) server? SQL 2012

From Dev

How to view .bak file from DATABASE BACKUP in SQL Server on Docker

From Dev

Converting a SQL server .bak file in to a DB in MYSQL

From Dev

Restore database using a bak file from another computer

From Dev

Restore database .bak file to azure elastic pool database from VM

From Dev

How do I call a remote T-SQL procedure to restore a remote .bak database file to a remote SQL Server instance?

From Dev

How to restore SQL Server .bak in Amazon RDS

From Dev

restore database in ssms 2017 selected bak file in device option and showing nothing in Backup sets to restore option and disable Ok button too

From Dev

How to create backup .bak file of specific table from database in sql server 2012?

From Dev

Restore SQL Server backup from varbinary(max) variable backup file

From Dev

How can I obtain a remote drive's free space, for SQL Server to write a .BAK file, via a command run from within SQL Server?

From Dev

How can I restore a .bak file to a new server without using the .mdf or .ldf files, programmatically with C#?

From Dev

How to restore a database from bak file from azure data studio on Mac

From Dev

Sax parsing a large file from S3

From Dev

How to stream an large file from S3 to a laravel view

From Dev

Alternative to loading large file from s3

From Dev

How to create BAK file from azure sql db

From Dev

Select latest .bak from blob store to automate restore to SQL Server 2016

From Java

How do you restore from a old __jb_bak__ or __jb_old__ file

From Dev

SQL Server Restore Database with new file names

Related Related

  1. 1

    RESTORE .bak-file from c:\users\ directories on SQL Server

  2. 2

    MS-SQL on Ubuntu: unable to restore database.bak file

  3. 3

    Restore Database from bak file

  4. 4

    How to restore a SQL Server 2012 database .bak file in C#?

  5. 5

    script to restore database sql server from bak file, doesn't work

  6. 6

    Restore a bak file which is more than 3 GB on a SQL Server 2017 Express edition getting error

  7. 7

    Restore a backup file on AWS RDS SQL Server from S3 bucket

  8. 8

    Restore selected tables from .bak file

  9. 9

    SQL Server says data is too large for column?

  10. 10

    How to restore a SQL Backup .bak file on a different (new) server? SQL 2012

  11. 11

    How to view .bak file from DATABASE BACKUP in SQL Server on Docker

  12. 12

    Converting a SQL server .bak file in to a DB in MYSQL

  13. 13

    Restore database using a bak file from another computer

  14. 14

    Restore database .bak file to azure elastic pool database from VM

  15. 15

    How do I call a remote T-SQL procedure to restore a remote .bak database file to a remote SQL Server instance?

  16. 16

    How to restore SQL Server .bak in Amazon RDS

  17. 17

    restore database in ssms 2017 selected bak file in device option and showing nothing in Backup sets to restore option and disable Ok button too

  18. 18

    How to create backup .bak file of specific table from database in sql server 2012?

  19. 19

    Restore SQL Server backup from varbinary(max) variable backup file

  20. 20

    How can I obtain a remote drive's free space, for SQL Server to write a .BAK file, via a command run from within SQL Server?

  21. 21

    How can I restore a .bak file to a new server without using the .mdf or .ldf files, programmatically with C#?

  22. 22

    How to restore a database from bak file from azure data studio on Mac

  23. 23

    Sax parsing a large file from S3

  24. 24

    How to stream an large file from S3 to a laravel view

  25. 25

    Alternative to loading large file from s3

  26. 26

    How to create BAK file from azure sql db

  27. 27

    Select latest .bak from blob store to automate restore to SQL Server 2016

  28. 28

    How do you restore from a old __jb_bak__ or __jb_old__ file

  29. 29

    SQL Server Restore Database with new file names

HotTag

Archive