Backups: Difference between revisions

Jump to navigation Jump to search
Line 88: Line 88:




Note: in any case, '''your sql backup file should disable foreign keys prior to restoring''', else your backup won't be restorable!
[[File:Warning.png]] in any case, '''your sql backup file should disable foreign keys prior to restoring''', else your backup won't be restorable!
Eg: Add FOREIGN_KEY_CHECKS in headers and footers:
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 FOREIGN_KEY_CHECKS=0;
Create table ...
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 ...


Insert into ...
...
...
SET FOREIGN_KEY_CHECKS=1;
SET FOREIGN_KEY_CHECKS=1;
</source>




439

edits

Navigation menu