backup

Add commits before root commit in Git? [duplicate]

谁说胖子不能爱 提交于 2019-12-17 10:47:02
问题 This question already has answers here : Insert a commit before the root commit in Git? (15 answers) Closed 6 years ago . New Question Two questions: I'm trying to put a commit before ALL commits. The bottommost commit has 660fb2a76211f36ec9a67d0454a90eab469e9fd0 as SHA. When I type git rebase -i 660fb2a76211f36ec9a67d0454a90eab469e9fd0 every commit but the last one gets displayed in the list. I really need this commit to appear so I can put the very first commit as very last! When I put the

How to restore a database from C#

孤人 提交于 2019-12-17 10:29:38
问题 I have a SQL 2008 DB. I am running a form that backs that DB up, then tries to update it. If the update fails the idea is to restore that backup. Here is the code I am using to restore the backup. public void RestoreDatabase(String databaseName, String backUpFile, String serverName, String userName, String password) { Restore sqlRestore = new Restore(); BackupDeviceItem deviceItem = new BackupDeviceItem(backUpFile, DeviceType.File); sqlRestore.Devices.Add(deviceItem); sqlRestore.Database =

SQL Server backup/restore vs. detach/attach

寵の児 提交于 2019-12-17 10:26:16
问题 I have one database which contains the most recent data, and I want to replicate the database content into some other servers. Due to non-technical reasons, I can not directly use replicate function or sync function to sync to other SQL Server instances. Now, I have two solutions, and I want to learn the pros and cons for each solution. Thanks! Solution 1: detach the source database which contains the most recent data, then copy to the destination servers which need the most recent data, and

How can I slow down a MySQL dump as to not affect current load on the server?

北城余情 提交于 2019-12-17 10:11:07
问题 While doing a MySQL dump is easy enough, I have a live dedicated MySQL server that I am wanting to setup replication on. To do this, I need dumps of the databases to import to my replication slave. The issue comes when I do the dumps, MySQL goes full force at it and ties up resources to the sites that connecting to it. I am wondering if there is a way to limit the dump queries to a low priority state to which preference is given to live connections? The idea being that the load from external

Zip files with Java: Is there a limit?

隐身守侯 提交于 2019-12-17 09:57:07
问题 I'm creating a backup routine for my application with Java. However, when the zip file is over 4GB, or has more than 65,000 files (approximately), the zip file is corrupted. I'm also testing the Apache Commons Compression for compacting to tar.gz, but it has file name limit of 100 characters. I was wanting to test this API compressing to zip, but I wonder what exactly is the problem with the java zip. So, the real question is: I'm doing something wrong, it is limit of Java Zip implementation,

Android - Preserve or delete files created by the application on uninstall

≯℡__Kan透↙ 提交于 2019-12-17 06:41:33
问题 I created an application which creates and stores files to sdcard. Is there a way to bind the folder with application in order to delete all files when the user runs uninstall on android device? 回答1: There's no way for your application to know that it is being uninstalled (without modifying the kernel). All files created in the data/data/your.app.package is deleted automatically upon application uninstall. I don't think anything is cleared from the sdcard. You can do a quick test and find

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

六月ゝ 毕业季﹏ 提交于 2019-12-17 04:34:14
问题 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

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

做~自己de王妃 提交于 2019-12-17 04:08:55
问题 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? 回答1: 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

Setting single user mode to restore backup

旧街凉风 提交于 2019-12-14 03:48:00
问题 I have the following function: public void RestoreDatabase(String databaseName, String backUpFile, String serverName, String userName, String password) { SqlConnection.ClearAllPools(); ServerConnection connection = new ServerConnection (serverName, userName, password); Server sqlServer = new Server(connection); Restore rstDatabase = new Restore(); rstDatabase.Action = RestoreActionType.Database; rstDatabase.Database = databaseName; BackupDeviceItem bkpDevice = new BackupDeviceItem (backUpFile

Delete backup files older than 7 days

a 夏天 提交于 2019-12-14 03:12:52
问题 Using osql command, SSQL backup of a database is created. It is saved to Disk. Then renamed to match the date of the day backup was taken. All these files are saved in a single folder all the time. for example: Batch1.bat does the following 1) Created backup.bak 2) renamed to backup 12-13-2009.bak (this is done by the combination of % ~ - etc to get the date parameter) This is now automated to take backup everyday by Task scheduler in Windows. Can the batch file also be modified to delete