439
edits
(→MySql) |
|||
| Line 43: | Line 43: | ||
Go into the directory where command '''mysql''' and your backup file is stored. | Go into the directory where command '''mysql''' and your backup file is stored. | ||
Launch the command provided previously. | Launch the command provided previously. | ||
Alternative: you can also use phpMyAdmin Import tab to restore your backup file (normally you don't have to check any particular option, but your backup file needs to disable foreign_key_checks, see below). | |||
[[File:Warning.png]] in any case, '''your sql backup file should disable foreign keys prior to restoring''', else your backup won't be restorable because of foreign keys clashing! | |||
Eg: Add FOREIGN_KEY_CHECKS in headers and footers: | |||
<source lang="sql"> | |||
-- SQL Dump | |||
-- Server version: 5.5.8 | |||
SET FOREIGN_KEY_CHECKS=0; | |||
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; | |||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; | |||
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; | |||
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; | |||
/*!40101 SET NAMES utf8 */; | |||
CREATE TABLE IF NOT EXISTS `llx_accountingaccount` ( | |||
INSERT INTO ... | |||
CREATE TABLE ... | |||
INSERT INTO ... | |||
... | |||
SET FOREIGN_KEY_CHECKS=1; | |||
</source> | |||
==PostgreSql== | ==PostgreSql== | ||
edits