Questions tagged [backup]

The act of saving one's files, data, applications, etc. to secondary media, allowing for the recovery of the files, data, applications, etc. in the event that the primary media becomes unavailable (fails). Also the secondary media used for storage.

5770 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
449
votes
9 answers

Tar a directory, but don't store full absolute paths in the archive

I have the following command in the part of a backup shell script: tar -cjf site1.bz2 /var/www/site1/ When I list the contents of the archive, I get: tar -tf…
QuentinC
  • 12,311
  • 4
  • 24
  • 37
361
votes
15 answers

Backup/Restore a dockerized PostgreSQL database

I'm trying to backup/restore a PostgreSQL database as is explained on the Docker website, but the data is not restored. The volumes used by the database image are: VOLUME ["/etc/postgresql", "/var/log/postgresql", "/var/lib/postgresql"] and the…
Carl Levasseur
  • 4,203
  • 3
  • 19
  • 19
303
votes
24 answers

How can I backup a remote SQL Server database to a local drive?

I need to copy a database from a remote server to a local one. I tried to use SQL Server Management Studio, but it only backs up to a drive on the remote server. Some points: I do not have access to the remote server in a way that I could copy…
Fernando
  • 4,459
  • 4
  • 26
  • 39
273
votes
8 answers

How to create a backup of a single table in a postgres database?

Is there a way to create a backup of a single table within a database using postgres? And how? Does this also work with the pg_dump command?
Elitmiar
  • 35,072
  • 73
  • 180
  • 229
258
votes
19 answers

How can I backup a Docker-container with its data-volumes?

I've been using this Docker-image tutum/wordpress to demonstrate a Wordpress website. Recently I found out that the image uses volumes for the MySQL-data. So the problem is this: If I want to backup and restore the container I can try to commit an…
pguardiario
  • 53,827
  • 19
  • 119
  • 159
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
223
votes
15 answers

input file appears to be a text format dump. Please use psql

I take backup using pg_dump db_production > postgres_db.dump and then I copy it to localhost using scp. Now when I import on my local db it gives an error pg_restore: [archiver] input file appears to be a text format dump. Please use psql. by…
Haseeb Ahmad
  • 7,914
  • 12
  • 55
  • 133
206
votes
32 answers

Postgresql 9.2 pg_dump version mismatch

I am trying to dump a Postgresql database using the pg_dump tool. $ pg_dump books > books.out How ever i am getting this error. pg_dump: server version: 9.2.1; pg_dump version: 9.1.6 pg_dump: aborting because of server version mismatch The…
Chris Colla
  • 2,163
  • 2
  • 13
  • 5
198
votes
8 answers

Postgres: clear entire database before re-creating / re-populating from bash script

I'm writing a shell script (will become a cronjob) that will: 1: dump my production database 2: import the dump into my development database Between step 1 and 2, I need to clear the development database (drop all tables?). How is this best…
Hoff
  • 38,776
  • 17
  • 74
  • 99
196
votes
19 answers

SVN repository backup strategies

What methods are available for backing up repositories in a Windows environment?
Robert Dean
  • 3,193
  • 3
  • 25
  • 29
1
2 3
99 100