backup

Backup SQL Schema Only?

二次信任 提交于 2019-11-26 21:29:04
问题 I need to create a backup of a SQL Server 2005 Database that's only the structure...no records, just the schema. Is there any way to do this? EDIT: I'm trying to create a backup file to use with old processes, so a script wouldn't work for my purposes, sorry 回答1: Use a 3 step process: Generate a script from the working database Create a new database from that script Create a backup of the new database 回答2: Why not just use SQL Management Studio to create a complete script of your database and

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

我是研究僧i 提交于 2019-11-26 21:14:52
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't find it anywhere. Thomasleveil if I want to revert the container I can try to commit an image, and then

Restore a postgres backup file using the command line?

拥有回忆 提交于 2019-11-26 21:08:05
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! Steven Schlansker 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_dump(1) as that is what creates the dump itself. It says: Dumps can be output in script or

Incremental backups with git bundle, for all branches

本秂侑毒 提交于 2019-11-26 19:59:23
问题 What is the easiest way to do incremental backups of a git repository with git bundle ? If I just wanted to backup a single branch, I could do something along these lines: git bundle create foo last-backup..master git tag -f last-backup master But what if I want to backup everything (including all branches)? To answer the questions in the comments: Strictly speaking, I do not need to use the usual Git bundles, as long as the solution satisfies the following properties: Each incremental backup

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

血红的双手。 提交于 2019-11-26 19:10:40
问题 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 using commad line pg_restore -d db_development postgres_db.dump 回答1: Before you downvote This is just a part of documentation! From the pg_dump documentation: Examples To dump a database called mydb into a SQL-script file : $ pg_dump mydb > db.sql To

How do I backup and restore the system clipboard in C#?

巧了我就是萌 提交于 2019-11-26 19:09:05
I will do my best to explain in detail what I'm trying to achieve. I'm using C# with IntPtr window handles to perform a CTRL-C copy operation on an external application from my own C# application. I had to do this because there was no way of accessing the text directly using GET_TEXT. I'm then using the text content of that copy within my application. The problem here is that I have now overwritten the clipboard. What I would like to be able to do is: Backup the original contents of the clipboard which could have been set by any application other than my own. Then perform the copy and store

s3cmd failed too many times

久未见 提交于 2019-11-26 19:01:50
问题 I used to be a happy s3cmd user. However recently when I try to transfer a large zip file (~7Gig) to Amazon S3, I am getting this error: $> s3cmd put thefile.tgz s3://thebucket/thefile.tgz .... 20480 of 7563176329 0% in 1s 14.97 kB/s failed WARNING: Upload failed: /thefile.tgz ([Errno 32] Broken pipe) WARNING: Retrying on lower speed (throttle=1.25) WARNING: Waiting 15 sec... thefile.tgz -> s3://thebucket/thefile.tgz [1 of 1] 8192 of 7563176329 0% in 1s 5.57 kB/s failed ERROR: Upload of

meteor: how can I backup my mongo database

折月煮酒 提交于 2019-11-26 18:50:06
问题 How can I make a backup of my meteor mongo database? If I run: meteor mongo the mongodump command does not work inside the meteor mongoshell 回答1: First you need to spin up meteor. Then if you run meteor mongo you will get an output something like this: MongoDB shell version: 2.2.1 connecting to: 127.0.0.1:3001/meteor Meteor db host is at 127.0.0.1 with a port of 3001. Exit the mongo shell and use mongodump from your terminal. mongodump -h 127.0.0.1 --port 3001 -d meteor Dumps will be located

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

こ雲淡風輕ζ 提交于 2019-11-26 17:59:45
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? Ozair Kafray Dump and restore a single table from .sql Dump mysqldump db_name table_name > table_name.sql Dumping from a remote database mysqldump -u <db_username> -h <db_host> -p db_name table_name > table_name.sql For further reference: http://www.abbeyworkshop.com/howto/lamp/MySQL_Export_Backup/index.html Restore mysql -u <user_name> -p db_name mysql> source <full_path>/table_name.sql or in one line mysql -u username -p db_name < /path/to/table_name

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

混江龙づ霸主 提交于 2019-11-26 17:54:23
问题 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 files; I do not have access to setup a UNC path to my server; Any ideas of how can I copy this database? Will I have to use 3rd party tools? 回答1: In Microsoft SQL Server Management Studio you can right-click on the database you wish to backup and click