The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [restore]

Reloading a database from a backup, typically for disaster recovery, or to make a copy of a database onto another server.

Filter by
Sorted by
Tagged with
69
votes
7answers
203k views

How to query last restore date in SQL Server?

Is there a T-SQL query that shows the last restore datetime for a certain database?
51
votes
6answers
19k views

Is it possible to quickly create/restore database snapshots with PostgreSQL?

First of all, I'm a developer, not a DBA or sysadmin; please be gentle :) I'm working on an application workflow where a single user action will trigger complex changes in the database - creating ...
41
votes
6answers
81k views

Restore mysql database with different name

How can we restore mysql database with different name from mysqldump file. I dont't want to open dump file and edit it. Any other better methods?
32
votes
1answer
5k views

DBA first day in a new job - check backups and security - How? what else should be checked?

Generally when I start in a new environment, I tend to check where are the backups, when the last full was taken, when was the last restore applied and I check the security too. The way I do this is ...
31
votes
6answers
185k views

media family on device is incorrectly formed. SQL Server cannot process this media family

I am trying to restore a .BAK in SQL server but get the following error: Msg 3241, Level 16, State 7, Line 1 The media family on device 'c:\glyn\JA.bak' is incorrectly formed. SQL Server cannot ...
29
votes
5answers
88k views

Restoring a backup to an older version of SQL Server

When trying to restore a backup to a SQL Server Express 2008 database I got the following error: Restore failed for Server '...\SQLEXPRESS'. (Microsoft.SqlServer.SmoExtended) System.Data.SqlClient....
27
votes
1answer
25k views

postgresql: how do I dump and restore roles for a cluster?

Where are roles stored in a cluster, and how do I dump them? I did a pg_dump of a db and then loaded it into a different cluster, but I get a lot of these errors: psql:mydump.sql:3621: ERROR: role "...
26
votes
3answers
31k views

Is it possible to restore sql-server bak and shrink the log at the same time?

We have a bak file from a client that we have transferred to our developer offices for problem investigation. The backup is currently 25GB and the restored database is about the same size however it ...
22
votes
2answers
12k views

How to restore a “contained” database? [closed]

I recently tried to restore to my local development SQL Server a backup from a network instance. To my surprised I received the following error message: Msg 12824, Level 16, State 1, Line 3 The ...
22
votes
2answers
13k views

Best way to migrate a huge SQL Server database with low downtime over network

Problem definition Our database server needs to be transferred to an other datacenter. It runs on Microsoft SQL Server 2012 Enterprise (64-bit) and contains two databases of about 2TB and 1TB. ...
20
votes
2answers
11k views

Restore database excluding FILESTREAM data

Context We are developing a system with a large-ish database in the bottom. It is an MS SQL database running on SQL Server 2008 R2. The total size of the database is about 12 GB. Out of these, ...
20
votes
1answer
2k views

Restore Database using GUI - Wrong file to restore

I'm just messing around with the SSMS graphic interface and studying the options of the "restore" task. One thing that I noticed is when I click on "generate script", the first line of the query is: ...
16
votes
2answers
34k views

Can I restore a SQL Server .bak files without SQL Server?

I have some large .bak files from a SQL Server 2005 dump. Can I restore these without using SQL Server, either to PostgreSQL, MySQL, or to flat text files? An open source solution would be most ...
16
votes
7answers
72k views

Error 3154 while restoring a backup using WITH REPLACE

I have SQL 2012 with SP1 installed on my computer. I made a backup of a database test.bak. I have a database with the name test2 which is the same database, but the data changed. I want to restore ...
16
votes
1answer
1k views

Sql Anywhere 11: Restoring incremental backup failure

We want to create remote incremental backups after a full backup. This will allow us to restore in the event of a failure and bring up another machine with as close to real time backups as possible ...
15
votes
3answers
76k views

Binary path in the pgAdmin preferences

I installed PostgreSQL because I need to restore a large .backup file I received for upload to another platform (it's 38 million rows which was apparently too large for the person to export any other ...
15
votes
5answers
2k views

Backing up & restoring 10-20 SQL Server databases to a ~synchronous state?

I need to backup up 10-20 SQL Server 2008 R2 databases with sizes between 10-50 GB, while they are online and used simultaneously by a single enterprise app. I also need to restore them to a state ...
15
votes
2answers
38k views

pg_restore: [archiver (db)] could not execute query: ERROR: schema “public” already exists

I am using pg_dump / pg_restore to backup and restore a PostgreSQL database, but am getting some error messages (and a non-zero exit status) from pg_restore. I tried a super simple base case (outlined ...
15
votes
2answers
39k views

Table is marked as crashed and should be repaired

I have MySQL and Nagios installed Linux PC (Centos5.5) I have wrote some script to fetch the data from Nagios to Mysql DB (Exactly fetch data in Table) The data fetching working properly (confirmed ...
14
votes
8answers
50k views

Error while restoring a Database from an SQL dump

I am extremely new to MySQL and am running it on Windows. I am trying to restore a Database from a dumpfile in MySQL, but I get the following error: $ >mysql -u root -p -h localhost -D database -...
14
votes
5answers
8k views

Attach/detach vs. backup/restore

I need to transfer the database (as a whole) to another server, to make a duplicate database to setup another test environment. I have two choices: Make a full backup at source server/restore at ...
14
votes
2answers
3k views

10 TB database backup / restore Question

We have a very big production database which is 10 TB. We are considering migrating it to a cloud service, but I have to understand the risks and estimate the duration of the whole process. I backup ...
14
votes
1answer
18k views

Checkpoints are occurring too frequently during pg_restore

Under PostgreSQL 9.2.2 (Windows 32 bits), I have a pg_restore command that systematically results in log warnings about the checkpoint frequency, for example: LOG: checkpoints are occurring too ...
14
votes
2answers
2k views

Can't restore SQL Server db from full backup, log processing fails, database in 'restoring' state

I am trying to set up a database for development purposes on my PC's local SQL Server Developer Edition 12.0.2000.8. I've got a full database backup and separate transaction-log-only backup files ...
13
votes
1answer
2k views

Temporarily moving a SQL Server 2016 database to SQL Server 2017 and then moving back. Is it possible?

If I take a backup of a database from a SQL Server 2016 instance and then restore it to a 2017 instance to do some work on it. Can I then turn around and back up that database from the 2017 instance ...
13
votes
1answer
17k views

disable constraints before using pg_restore.exe

When I try to execute pg_restore.exe of a dump file from a database, it throws dozens of errors, all the same: ERROR: insert or update on table "someTable" violates foreign key constraint "...
13
votes
1answer
13k views

Why do we use FILE = 1 in scripts for restoring a database

Recently when I came across the script for restoring a database, I got a doubt on why we have to use "FILE = 1"? Can't we restore a database without that statement!? Basically, what it is used for?
13
votes
2answers
1k views

Online page restore hitting 1000 limit

I've been tasked to try to recover a database which suffered from corruption (due to I/O failure, which has been fixed since). I'm not familiar with the database or what it contains. I've been given ...
13
votes
1answer
1k views

Differential Backup Issue - Why? Is this Possible?

I am using SQL Server 2014 and this is the situation: I have server A and server B. Overnight ETL is processed on server A. After the loading process completes, database X gets backed-up (with ...
13
votes
1answer
21k views

Restoring a SQL Server 2012 database in high availability

I have a database which is in always-on high availability mode synchronized with another database on a different instance. How can I restore from a .bak file into the primary database using T-SQL? I'...
13
votes
2answers
18k views

Mongo DB Replica set Stuck at RECOVERING state

We have created a replica set and now the problem is 2 members of replica set [3 members set] are in recovering mode from 48 hours. Initially the size of recovering nodes was increasing and now even ...
12
votes
4answers
14k views

Extracting a field from RESTORE HEADERONLY

I'm trying to use 'RESTORE HEADERONLY' to get the date when the backup I'm about to restore was made. The command: RESTORE HEADERONLY FROM DISK = '<path to .bak file>' works fine in Query ...
12
votes
4answers
9k views

Restore Database wizard won't open in SSMS 2014

On a dev machine running Windows Server 2012 R2, I just upgraded SQL Server from 2012 to 2014. Using SQL Server Management Studio 2014, when I right-click a database and go to Tasks -> Restore -&...
11
votes
6answers
18k views

Migrate from SQL Server 2000 to 2012 without a 2005 or 2008 instance

I have come across three old databases sitting on SQL Server 2000 which I need to move to 2012. I believe the standard approach is to restore into a 2005 or 2008 instance, update, re-export and ...
11
votes
3answers
58k views

“Database is in transition” Error

Today I was trying to restore a database over an already existing database, I simply right clicked the database in SSMS --> Tasks --> Take Offline so I could restore the database. A small pop up ...
11
votes
2answers
1k views

A Non-DBA Asks: How to Painlessly Copy/Move a SQL Server instance to another Server via Backup/Restore?

We've just got a new server so I need to copy the existing SQL Server 2008 instance over from the old db box. I normally do this by copying .mdf and log files over and attaching them but I'm not able ...
11
votes
1answer
2k views

Restoring differential backup creates DEFUNCT log file?

Here is my problem. I'm trying to move a database to a new server via a full restore, then cutover with a quick differential backup/restore. I can do a full restore without a problem, but when ...
10
votes
3answers
776 views

Unable to restore TDE enabled database when MAXTRANSFERSIZE and CHECKSUM is used

Update: @AmitBanerjee - Senior Program Manager for the Microsoft SQL Server Product Group confirmed that MS will look into the issue as it is a defect. Has anyone encountered issue restoring backups ...
9
votes
5answers
24k views

User Permissions Messed Up following a Backup -> Restore Operation

I had to move several SQL Server 2008 databases to our new db server so I backed them all up (to .bak files), copied these files over to the new box and restored them (all done using SQL Management ...
9
votes
1answer
168 views

How do I find the FamilyGUID of an exsting database

When executing a RESTORE command, I understand that SQL Server ensures that an existing database is not being overwritten by a different database. This check can be bypassed using REPLACE. I ...
9
votes
1answer
2k views

Unable to restore (error 3456)

I have a situation that is not easy to figure out, and thought I'd ask on this forum if others might have suggestions. I'm running SQL Server 2008 R2 Standard SP3 on Windows Server 2008R2 Enterprise. ...
9
votes
1answer
26k views

Restore encrypted database to another server

I'm using a product which runs on SQLServer 2008. Understandably the company supplying it don't offer SQLServer support. When I installed the product I specified a password to encrypt the database. I'...
9
votes
1answer
9k views

Tail Log backup when doing a restore?

Typically when doing a restore of a DB from a production server to a non-production server I will use the WITH REPLACE option as when I forget I get an error about the tail log not being backed up. ...
8
votes
2answers
23k views

Restore a SQL Server 2012 backup file in SQL Server 2016/2014

I have SQL Server 2012 backup files and want to restore these to SQL Server 2016/2014. Will it work? I need to find this out before I uninstall SQL Server 2012.
8
votes
1answer
14k views

SQL Server error “Missing family sequence number 2”

I'm trying to restore a local database on my server, but I'm having problems with the backup. I did a file .bak but every time I try to load it on the server it doesn't let me. Here's a screenshot of ...
8
votes
1answer
908 views

Database size reduced after backup on PostgreSQL 8.3 and restore in PostgreSQL 9.4

I did a pg_dump on a JIRA database that I was hosting in a PostgreSQL 8.3 server. Size of the database after vacuum full was 217132652 (approximately 207 MB). Then I restored that JIRA database on a ...
8
votes
1answer
17k views

How can I recover data from the LDF file?

We are using SQL 2005 Express Edition. We want to read the data from the LDF file in order to restore some deleted records. We tried using a trial version of ApexSQL which helped us a lot. Instead of ...
8
votes
2answers
2k views

Shrinking a SQL Server Transaction Log

I’m currently having to deal with a SQL Server transaction log that has got out of control. Disclaimer: I’m not a dba and this isn’t my area of expertise so please bear with me. Currently I have a ...
8
votes
1answer
6k views

Timeout expired error while using copy database wizard

Microsoft made me believe that SQL Server 2012 Copy Database Wizard is the most optimal way of copying a SQL Server 2000 database to SQL Server 2012. After struggling a few hours, I was able to get ...
8
votes
2answers
3k views

How to wait for PostgreSQL to be startable / restorable?

I'm testing a PostgreSQL 8.2.1 to 9.2 upgrade on a virtual machine running a custom Linux distro. The upgrade procedure is as follows: Start the pg service Vacuum all DBs (not sure if this is needed) ...