Questions tagged [restore]

Use this tag on any questions related to data restore (in contrast to data recovery).

Both the terms recover and restore to retrieving data from a backup. More specifically, recover refers to salvaging one or more files, while a restore usually refers replacing a complete system or hard drive from a full system backup.

Further reading:

2026 questions
650
votes
29 answers

SQL Server: Database stuck in "Restoring" state

I backed up a database: BACKUP DATABASE MyDatabase TO DISK = 'MyDatabase.bak' WITH INIT --overwrite existing And then tried to restore it: RESTORE DATABASE MyDatabase FROM DISK = 'MyDatabase.bak' WITH REPLACE --force restore over specified…
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
544
votes
10 answers

How to take backup of a single table in a MySQL database?

By default, mysqldump takes the backup of an entire database. I need to backup a single table in MySQL. Is it possible? How do I restore it?
Mandar Pande
  • 12,250
  • 16
  • 45
  • 72
525
votes
31 answers

Restore a postgres backup file using the command line?

Locally, I use pgadmin3. On the remote server, however, I have no such luxury. I've already created the backup of the database and copied it over, but is there a way to restore a backup from the command line? I only see things related to GUI or to…
TwixxyKit
  • 9,953
  • 9
  • 31
  • 32
252
votes
10 answers

How to restore to a different database in SQL Server?

I have a backup of Database1 from a week ago. The backup is done weekly in the scheduler and I get a .bak file. Now I want to fiddle with some data so I need to restore it to a different database - Database2. I have seen this question: Restore SQL…
LocustHorde
  • 6,361
  • 16
  • 65
  • 94
240
votes
20 answers

Can I restore a single table from a full mysql mysqldump file?

I have a mysqldump backup of my mysql database consisting of all of our tables which is about 440 megs. I want to restore the contents of just one of the tables from the mysqldump. Is this possible? Theoretically, I could just cut out the section…
Mobius
  • 2,685
  • 4
  • 18
  • 17
228
votes
19 answers

SQL Server Restore Error - Access is Denied

I created a database on my local machine and then did a backup called tables.bak of table DataLabTables. I moved that backup to a remote machine without that table and tried to do a restore but get the following…
cdub
  • 24,555
  • 57
  • 174
  • 303
224
votes
4 answers

What is the `git restore` command and what is the difference between `git restore` and `git reset`?

When I want to unstage a staged file, all of my Git tutorials show something like: $ git add * $ git status On branch master Changes to be committed: (use "git reset HEAD ..." to unstage) renamed: README.md -> README modified: …
Thinh NV
  • 3,182
  • 3
  • 18
  • 17
173
votes
10 answers

When restoring a backup, how do I disconnect all active connections?

My SQL Server 2005 doesn't restore a backup because of active connections. How can I force it?
Jader Dias
  • 88,211
  • 155
  • 421
  • 625
168
votes
21 answers

"No backupset selected to be restored" SQL Server 2012

I have a SQL Server 2012 database with filestream enabled. However, when I backup it and try to restore it on another SQL Server 2012 instance (on another machine), I simply get this message that: No backupset selected to be restored. Not even a…
Saeed Neamati
  • 35,341
  • 41
  • 136
  • 188
160
votes
11 answers

Restoring MySQL database from physical files

Is it possible to restore a MySQL database from the physical database files. I have a directory that has the following file types: client.frm client.MYD client.MYI but for about 20 more tables. I usually use mysqldump or a similar tool to get…
Abdullah Jibaly
  • 53,220
  • 42
  • 124
  • 197
128
votes
3 answers

Git - Can we recover deleted commits?

I am surprised, I couldn't find the answer to this on SO. Can we recover/restore deleted commits in git? For example, this is what I did: # Remove the last commit from my local branch $ git reset --hard HEAD~1 # Force push the delete $ git push…
Atri
  • 5,511
  • 5
  • 30
  • 40
125
votes
9 answers

What is the correct way to restore a deleted file from SVN?

I deleted a file from a repo and now want to put it back. The best I can figure out is to: update to the revision before the delete copy the files elsewhere update to head copy the files back add them commit That just smells bad and it looses all…
BCS
  • 75,627
  • 68
  • 187
  • 294
122
votes
5 answers

When exactly are onSaveInstanceState() and onRestoreInstanceState() called?

The following figure (from the official doc) describes the well-known lifecycle of an Android activity: On the other hand, when the activity is destroyed by the system (for example because memory needs to be reclaimed), the state of the activity is…
Luis Mendo
  • 110,752
  • 13
  • 76
  • 147
113
votes
18 answers

SQL-Server: Is there a SQL script that I can use to determine the progress of a SQL Server backup or restore process?

When I backup or restore a database using MS SQL Server Management Studio, I get a visual indication of how far the process has progressed, and thus how much longer I still need to wait for it to finish. If I kick off the backup or restore with a…
Veldmuis
  • 4,678
  • 4
  • 25
  • 25
104
votes
4 answers

pg_restore error: role XXX does not exist

Trying to replicate a database from one system to another. The versions involved are 9.5.0 (source) and 9.5.2 (target). Source db name is foodb with owner pgdba and target db name will be named foodb_dev with owner pgdev. All commands are run on…
Thalis K.
  • 7,363
  • 6
  • 39
  • 54
1
2 3
99 100