backup

How to do a backup from a Postgresql-DB via JDBC?

徘徊边缘 提交于 2019-12-19 03:16:01
问题 In our application, we've implemented an automatic DB migration triggered from within our code. Now we want to backup the existing DB before doing any migration. Can anyone explain how to do a full backup of a Postgresql-DB via JDBC from within Java code? Update: it doesn't work via JDBC. Here some working code to the response of Frank Heikens: final List<String> baseCmds = new ArrayList<String>(); baseCmds.add("/usr/bin/pg_dump"); baseCmds.add("-h"); baseCmds.add("hostname"); baseCmds.add("

PHP download backup of MySQL database

家住魔仙堡 提交于 2019-12-18 18:09:27
问题 I want to give a client the ability to manually download a backup of his database. I am coding the site using PHP and MySQL. So after the admin user has logged in there would be a link in the menu to download a .sql file to the local computer. How can I accomplish this with PHP? 回答1: This can get messy trying to back up a database from PHP, you would be better of letting MySql handle this, and the best way to tell mysql to do this is with a shell script: #!/bin/bash # Shell script to backup

How do I backup a MySQL database?

点点圈 提交于 2019-12-18 17:24:12
问题 What do I have to consider when backing up a database with millions of entries? Are there any tools (maybe bundled with the MySQL server) that I could use? 回答1: Depending on your requirements, there's several options that I have been using myself: if you don't need hot backups, take down the db server and back up on the file system level, i. e. using tar, rsync or similar. if you do need the database server to keep running, you can start out with the mysqlhotcopy tool (a perl script), which

How to make sure my git repo code is safe?

血红的双手。 提交于 2019-12-18 16:54:34
问题 If our organisation were to switch from a central-server VCS like subversion to a distributed VCS like git, how do I make sure that all my code is safe from hardware failure? With a central-server VCS I just need to backup the repository every day. If we were using a DVCS then there'd be loads of code branches on all the developer machines, and if that hardware were to fail (or a dev were to lose his laptop or have it stolen) then we wouldn't have any backups. Note that I don't consider it a

How do I back up and restore my Delphi settings? [duplicate]

不羁岁月 提交于 2019-12-18 15:53:12
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: How to migrate Delphi or clone Delphi registry settings? I need to format my PC soon, but I have the IDE and environment settings perfectly set up to just how I want them, along with some components I have installed. Obviously formatting and reinstalling Windows will wipe all settings and registry entries, so when I do install Delphi again I will have to tweak it all to get it to how it originally was, which

Are concurrent git pushes always safe if the second push only has fast-forwards from the first push?

扶醉桌前 提交于 2019-12-18 15:32:15
问题 This question was migrated from Server Fault because it can be answered on Stack Overflow. Migrated 8 years ago . I want to automatically push commits in the post-receive hook from a central repo on our LAN to another central repo in the cloud. The LAN repo is created using git clone --mirror git@cloud:/path/to/repo or equivalent commands. Because the files being committed will be large relative to our upstream bandwidth, it's entirely possible something like this could happen: Alice

Are concurrent git pushes always safe if the second push only has fast-forwards from the first push?

旧巷老猫 提交于 2019-12-18 15:31:12
问题 This question was migrated from Server Fault because it can be answered on Stack Overflow. Migrated 8 years ago . I want to automatically push commits in the post-receive hook from a central repo on our LAN to another central repo in the cloud. The LAN repo is created using git clone --mirror git@cloud:/path/to/repo or equivalent commands. Because the files being committed will be large relative to our upstream bandwidth, it's entirely possible something like this could happen: Alice

Backup database(s) using query without using mysqldump

十年热恋 提交于 2019-12-18 13:01:12
问题 I'd like to dump my databases to a file. Certain website hosts don't allow remote or command line access, so I have to do this using a series of queries. All of the related questions say "use mysqldump " which is a great tool but I don't have command line access to this database. I'd like CREATE and INSERT commands to be created at the same time - basically, the same performance as mysqldump . Is SELECT INTO OUTFILE the right road to travel, or is there something else I'm overlooking - or

Backup database(s) using query without using mysqldump

ぐ巨炮叔叔 提交于 2019-12-18 13:01:09
问题 I'd like to dump my databases to a file. Certain website hosts don't allow remote or command line access, so I have to do this using a series of queries. All of the related questions say "use mysqldump " which is a great tool but I don't have command line access to this database. I'd like CREATE and INSERT commands to be created at the same time - basically, the same performance as mysqldump . Is SELECT INTO OUTFILE the right road to travel, or is there something else I'm overlooking - or

MySQL InnoDB database restore

情到浓时终转凉″ 提交于 2019-12-18 12:01:04
问题 I have to restore a database that has been inadvertently DROPped in MySQL 5.0. From checking the backup files, I only seem to have .FRM files to hold the database data. Can anyone advise whether this is all I need to perform a database restore/import from the backup, or are there other files I should have to hand to complete this? 回答1: .frm files are not the data files, they just store the "data dictionary information" (see MySQL manual). InnoDB stores its data in ib_logfile* files. That's