backup

How to export/import the Jenkins configuration?

对着背影说爱祢 提交于 2019-11-27 15:42:03
问题 The Jenkins CLI provides the function to export&import single jobs, e.g.: java -jar jenkins-cli.jar -s http://foo-jenkins.tld:8080 get-job myjob > myjob.xml java -jar jenkins-cli.jar -s http://bar-jenkins.tld:8080 create-job newmyjob < myjob.xml Is it also possible / How to backup&restore the configs? I mean the whole settings: the system configuration, the global security configuration, the credentials, the global tool configuration, the plugins configuration (the "HTTP Proxy Configuration"

How to skip row when importing bad MySQL dump

只愿长相守 提交于 2019-11-27 15:30:42
问题 Given bad mysqldump that causes error on import: namtar backups # mysql -p < 2010-12-01.sql Enter password: ERROR 1062 (23000) at line 8020: Duplicate entry 'l�he?' for key 'wrd_txt' Is there an easy way to tell import to just skip given row and continue? (Yes, I know I can manually edit the file or parse output, but it's not very convinient) 回答1: If you can make the dump again you could add --insert-ignore to the command-line when dumping. Or you can try using the mysqlimport command with -

What is the best way to back up an entire git repository on external disk?

泪湿孤枕 提交于 2019-11-27 14:37:13
问题 So I want to be able to back up a git repository that may have several branches onto an external hard drive and then be at a later time be able to copy it back onto my local machine and work with it as usual? I have tried simply copying the working directory folder containing the .git directory and it worked. However, I was wondering if this was the best way or if it had pitfalls later. 回答1: Copying the entire working copy using regular file system copy commands works fine. You can also zip

Add commits before root commit in Git? [duplicate]

让人想犯罪 __ 提交于 2019-11-27 12:51:18
This question already has an answer here: Insert a commit before the root commit in Git? 14 answers 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 very first commit as first in the list (meaning second commit in total, because the very first is not in the list as

mysqldump with db in a separate file

你离开我真会死。 提交于 2019-11-27 11:56:09
I'm writing a single line command that backups all databases into their respective names instead using of dumping all in one sql. Eg: db1 get saved to db1.sql and db2 gets saved to db2.sql So far, I'd gathered the following commands to retrieve all databases. mysql -uuname -ppwd -e 'show databases' | grep -v 'Database' I'm planning to pipe it with awk to do something like awk '{mysqldump -uuname -ppwd $1 > $1.sql}' But that doesn't work. I'm new to bash, so I could be wrong in my thinking. What should I do to make it export the db in their respective names? update: Ok, have to finally managed

BackupManager Not Calling Backup Transport

南楼画角 提交于 2019-11-27 11:50:20
问题 Alright, so I'm trying to implement Data Backup into my application, and have been following this guide. I've implemented my BackupAgentHelper using a SharedPreferencesBackupHelper . I don't get any errors, and I'm being sure to call dataChanged() after all preference changes, but when I test the backup (`adb shell bmgr run) I get this information in LogCat: 07-07 12:29:00.258: V/BackupManagerService(291): Scheduling immediate backup pass 07-07 12:29:00.258: V/BackupManagerService(291):

How to restore a database from C#

南笙酒味 提交于 2019-11-27 11:43:33
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 = databaseName; ServerConnection connection = new ServerConnection(serverName, userName, password); Server

SQL Server backup/restore vs. detach/attach

前提是你 提交于 2019-11-27 11:40:34
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 attach database at the destination servers; Solution 2: make a full backup of source server for the

is it possible backup and RESTORE a database file in android? non root devices [duplicate]

女生的网名这么多〃 提交于 2019-11-27 11:23:53
This question already has an answer here: Backup and restore SQLite database to sdcard 4 answers in my app I need get a backup of my database, but after I'll need restore it again, i have read somethings, but i do not sure if this is necessary to have a rooted device, i need backup/restore the all data in non root devices, is it possible? my first idea was creating a txt file for write the select, and later insert it again. but i believe this is much "problem" then i don't know if this is possible copy the database and paste in sd card for backup, and copy from sd card and paste in path of

What is the best way to implement soft deletion?

笑着哭i 提交于 2019-11-27 10:56:17
Working on a project at the moment and we have to implement soft deletion for the majority of users (user roles). We decided to add an "is_deleted='0'" field on each table in the database and set it to '1' if particular user roles hit a delete button on a specific record. For future maintenance now, each SELECT query will need to ensure they do not include records where is_deleted='1'. Is there a better solution for implementing soft deletion? Update: I should also note that we have an Audit database that tracks changes (field, old value, new value, time, user, ip) to all tables/fields within