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
183
votes
14 answers

Fully backup a git repo?

Is there a simple way to backup an entire git repo including all branches and tags?
Daniel Upton
  • 5,561
  • 8
  • 41
  • 64
182
votes
25 answers

Cannot open backup device. Operating System error 5

Below is the query that I am using to backup (create a .bak) my database. However, whenever I run it, I always get this error message: Msg 3201, Level 16, State 1, Line 1 Cannot open backup device 'C:\Users\Me\Desktop\Backup\MyDB.Bak'. Operating…
Smiley
  • 3,207
  • 13
  • 49
  • 66
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
171
votes
8 answers

How to backup a local Git repository?

I am using git on a relatively small project and I find that zipping the .git directory's contents might be a fine way to back up the project. But this is kind of weird because, when I restore, the first thing I need to do is git reset --hard. Are…
Dan Rosenstark
  • 68,471
  • 58
  • 283
  • 421
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
155
votes
6 answers

How to backup sqlite database?

What's the proper way to do it? Do I just copy the .sq3 file? What if there are users on the site and file is being written while it's being copied?
thelolcat
  • 10,995
  • 21
  • 60
  • 102
149
votes
3 answers

What does f+++++++++ mean in rsync logs?

I'm using rsync to make a backup of my server files, and I have two questions: In the middle of the process I need to stop and start rsync again. Will rsync start from the point where it stopped or it will restart from the beginning? In the log…
GodFather
  • 3,031
  • 4
  • 25
  • 36
144
votes
9 answers

How can I make robocopy silent in the command line except for progress?

I'm using robocopy to do backups with a PowerShell script, and it's pretty awesome, except that I'd like it to only show the progress percentage while it copies and not all of the other information. The other information clutters the command window,…
AndrewL
  • 3,126
  • 5
  • 31
  • 33
116
votes
10 answers

Find files and tar them (with spaces)

Alright, so simple problem here. I'm working on a simple back up code. It works fine except if the files have spaces in them. This is how I'm finding files and adding them to a tar archive: find . -type f | xargs tar -czvf backup.tar.gz The…
Caleb Kester
  • 1,650
  • 2
  • 14
  • 16
115
votes
8 answers

Backup strategies for AWS S3 bucket

I'm looking for some advice or best practice to back up S3 bucket. The purpose of backing up data from S3 is to prevent data loss because of the following: S3 issue issue where I accidentally delete this data from S3 After some investigation I…
Sergey Alekseev
  • 11,910
  • 11
  • 38
  • 53
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
108
votes
2 answers

How to extract or unpack an .ab file (Android Backup file)

I am running an android 4.0.3 device, and I want to extract the back up file created by : adb backup -f ~/data.ab -noapk app.package.name The above line works inside the CMD (windows) and I am able to get the data.ab file inside the '~' directory.…
tony9099
  • 4,567
  • 9
  • 44
  • 73
108
votes
2 answers

Creating a shadow copy using the "Backup" context in a PowerShell

I am in the process of writing a PowerShell script for backing up a Windows computer using rsync. To this end, I am attempting to use WMI from said script to create a non-persistent Shadow copy with writer participation (as is apparently recommended…
Julien Picalausa
  • 1,189
  • 1
  • 7
  • 3
106
votes
14 answers

What is a simple command line program or script to backup SQL server databases?

I've been too lax with performing DB backups on our internal servers. Is there a simple command line program that I can use to backup certain databases in SQL Server 2005? Or is there a simple VBScript?
Frank Krueger
  • 69,552
  • 46
  • 163
  • 208
100
votes
12 answers

Dump a mysql database to a plaintext (CSV) backup from the command line

I'd like to avoid mysqldump since that outputs in a form that is only convenient for mysql to read. CSV seems more universal (one file per table is fine). But if there are advantages to mysqldump, I'm all ears. Also, I'd like something I can run…
dreeves
  • 26,430
  • 45
  • 154
  • 229