backup

Speeding up mysql dumps and imports [closed]

て烟熏妆下的殇ゞ 提交于 2019-11-26 08:48:51
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . Locked . This question and its answers are locked because the question is off-topic but has historical significance. It is not

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

廉价感情. 提交于 2019-11-26 08:45:33
问题 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? 回答1: To backup a single database from the command line, use osql or sqlcmd. "C:\Program Files\Microsoft SQL Server\90\Tools\Binn\osql.exe" -E -Q "BACKUP DATABASE mydatabase TO DISK='C:\tmp\db.bak' WITH FORMAT" You'll also want to read the documentation on BACKUP and RESTORE and general

SQL Server: Database stuck in “Restoring” state

守給你的承諾、 提交于 2019-11-26 08:39:12
问题 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 database And now the database is stuck in the restoring state. Some people have theorized that it\'s because there was no log file in the backup, and it needed to be rolled forward using: RESTORE DATABASE MyDatabase WITH RECOVERY Except that, of course,

Android 1.5: Reading SMS messages

不打扰是莪最后的温柔 提交于 2019-11-26 08:19:37
问题 I\'m creating a backup utility for Android and I need to read content of inbox, outbox and dratfs. How can I accomplish that on SDK v1.5? 回答1: There is a content provider for accessing SMS messages, but it's not documented in the public SDK. If you use ContentResolver.query() with a Uri of content://sms you should be able to access these messages. You can find more information on this Google Groups thread or previous questions on stackoverflow. 回答2: If you can open a connection to the

Restore a postgres backup file using the command line?

大憨熊 提交于 2019-11-26 07:50:57
问题 I\'m new to postgresql, and 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 pg_dumps, so, if someone can tell me how to go about this, that\'d be terrific! 回答1: There are two tools to look at, depending on how you created the dump file. Your first source of reference should be the man page pg

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

吃可爱长大的小学妹 提交于 2019-11-26 06:10:05
问题 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 image, and then later delete the container, and create a new container from the committed image. But if I do that the volume gets deleted and all my data is gone. There must be some simple way to backup my container plus its volume-data but I can\

Export MySQL database using PHP only [closed]

时光毁灭记忆、已成空白 提交于 2019-11-26 05:26:36
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last year . What would be a piece of PHP code for exporting a MySQL database to a .sql file? I don\'t have shell access so I can\'t use exec . I\'ve found some code but I looked through the code and this code is old and not well written. Most instructions I\'ve found require shell access … the rest is outdated. Thanks in

Backup and restore SQLite database to sdcard

佐手、 提交于 2019-11-26 04:45:35
问题 How can I backup my database to the sdcard automatically in my app? And afterward, how do I restore it? 回答1: Here is my code: // Local database InputStream input = new FileInputStream(from); // create directory for backup File dir = new File(DB_BACKUP_PATH); dir.mkdir(); // Path to the external backup OutputStream output = new FileOutputStream(to); // transfer bytes from the Input File to the Output File byte[] buffer = new byte[1024]; int length; while ((length = input.read(buffer))>0) {

How can I detect only deleted, changed, and created files on a volume?

非 Y 不嫁゛ 提交于 2019-11-26 03:39:37
问题 I need to know if there is an easy way of detecting only the files that were deleted, modified or created on an NTFS volume. I have written a program for offsite backup in C++. After the first backup, I check the archive bit of each file to see if there was any change made, and back up only the files that were changed. Also, it backs up from the VSS snapshot in order to prevent file locks. This seems to work fine on most file systems, but for some with lots of files and directories, this

Fully backup a git repo?

牧云@^-^@ 提交于 2019-11-26 03:04:52
问题 Is there a simple way to backup an entire git repo including all branches and tags? 回答1: Whats about just make a clone of it? git clone --mirror other/repo.git Every repository is a backup of its remote. 回答2: git bundle I like that method, as it results in only one file, easier to copy around. See ProGit: little bundle of joy. See also "How can I email someone a git repository?", where the command git bundle create /tmp/foo-all --all is detailed: git bundle will only package references that