Aller au contenu

Différences entre plusieurs backup de la même base


Dax

Sujets conseillés

Bonjour le Hub,

J'ai testé 4 façons de faire une sauvegarde de ma bdd et je trouve certaines différences lorsque je compare les fichiers.

Quel sont pour vous les plus fiables ? (donnez moi votre classement)

1. un script de sauvegarde (n°1)

2. en utilisant PhpMyAdmin

3. un autre script de sauvegarde (n°2)

4. directement depuis l'admin de mon site

1.

CODE
create table cl_ad (

ad_id int(11) not null auto_increment,

ad_owner int(11) default '0' ,

ad_cat_id int(11) default '0' ,

ad_title varchar(255) default '0' ,

ad_description text ,

ad_date int(11) default '0' ,

ad_date_expire int(11) default '0' ,

ad_date_updated int(11) default '0' ,

ad_expires_after_days int(11) default '0' ,

ad_owner_notified tinyint(1) default '0' ,

ad_has_video tinyint(1) default '0' ,

ad_has_picture tinyint(1) default '0' ,

ad_has_doc int(11) default '0' ,

ad_views int(11) default '0' ,

ad_votes double(6,2) default '0.00' ,

ad_voters int(11) default '0' ,

ad_totalscore double(6,2) default '0.00' ,

ad_last_vote_ip varchar(20) default '0' ,

ad_is_validated tinyint(1) default '0' ,

ad_is_sold tinyint(1) default '0' ,

ad_is_special tinyint(1) default '0' ,

ad_is_premium tinyint(1) default '0' ,

PRIMARY KEY (ad_id)

);

insert into cl_ad (ad_id, ad_owner, ad_cat_id, ad_title, ad_description, ad_date, ad_date_expire, ad_date_updated, ad_expires_after_days, ad_owner_notified, ad_has_video, ad_has_picture, ad_has_doc, ad_views, ad_votes, ad_voters, ad_totalscore, ad_last_vote_ip, ad_is_validated, ad_is_sold, ad_is_special, ad_is_premium) values ('32', '20', '72', 'MAISON DE VILLAGE', 'TRES BELLE APPARTEMENT CLIMATISE DANS MAISON AU CENTRE DU VILLAGE', '1174066444', '1210350844', '1202111808', '0', '0', '0', '4', '0', '808', '0.00', '0', '0.00', '0', '1', '0', '0', '0');

insert into cl_ad (ad_id, ad_owner, ad_cat_id, ad_title, ad_description, ad_date, ad_date_expire, ad_date_updated, ad_expires_after_days, ad_owner_notified, ad_has_video, ad_has_picture, ad_has_doc, ad_views, ad_votes, ad_voters, ad_totalscore, ad_last_vote_ip, ad_is_validated, ad_is_sold, ad_is_special, ad_is_premium) values ('33', '20', '83', 'YAMAHA VIRAGO', 'TRES BELLE MOTO VIROGO BLEU NUIT 20000KMS ANNEE 91 PORTE BAGAGES PRIX 1800', '1174067919', '1210352319', '1202111599', '0', '0', '0', '0', '0', '380', '0.00', '0', '0.00', '0', '1', '0', '0', '0');

2.

CODE
CREATE TABLE IF NOT EXISTS `cl_ad` (

`ad_id` int(11) NOT NULL auto_increment,

`ad_owner` int(11) default '0',

`ad_cat_id` int(11) default '0',

`ad_title` varchar(255) default '0',

`ad_description` text,

`ad_date` int(11) default '0',

`ad_date_expire` int(11) default '0',

`ad_date_updated` int(11) default '0',

`ad_expires_after_days` int(11) default '0',

`ad_owner_notified` tinyint(1) default '0',

`ad_has_video` tinyint(1) default '0',

`ad_has_picture` tinyint(1) default '0',

`ad_has_doc` int(11) default '0',

`ad_views` int(11) default '0',

`ad_votes` double(6,2) default '0.00',

`ad_voters` int(11) default '0',

`ad_totalscore` double(6,2) default '0.00',

`ad_last_vote_ip` varchar(20) default '0',

`ad_is_validated` tinyint(1) default '0',

`ad_is_sold` tinyint(1) default '0',

`ad_is_special` tinyint(1) default '0',

`ad_is_premium` tinyint(1) default '0',

PRIMARY KEY (`ad_id`)

) TYPE=MyISAM AUTO_INCREMENT=559 ;

--

-- Contenu de la table `cl_ad`

--

INSERT INTO `cl_ad` (`ad_id`, `ad_owner`, `ad_cat_id`, `ad_title`, `ad_description`, `ad_date`, `ad_date_expire`, `ad_date_updated`, `ad_expires_after_days`, `ad_owner_notified`, `ad_has_video`, `ad_has_picture`, `ad_has_doc`, `ad_views`, `ad_votes`, `ad_voters`, `ad_totalscore`, `ad_last_vote_ip`, `ad_is_validated`, `ad_is_sold`, `ad_is_special`, `ad_is_premium`) VALUES (32, 20, 72, 'MAISON DE VILLAGE', 'TRES BELLE APPARTEMENT CLIMATISE DANS MAISON AU CENTRE DU VILLAGE', 1174066444, 1210350844, 1202111808, 0, 0, 0, 4, 0, 808, 0.00, 0, 0.00, '0', 1, 0, 0, 0);

INSERT INTO `cl_ad` (`ad_id`, `ad_owner`, `ad_cat_id`, `ad_title`, `ad_description`, `ad_date`, `ad_date_expire`, `ad_date_updated`, `ad_expires_after_days`, `ad_owner_notified`, `ad_has_video`, `ad_has_picture`, `ad_has_doc`, `ad_views`, `ad_votes`, `ad_voters`, `ad_totalscore`, `ad_last_vote_ip`, `ad_is_validated`, `ad_is_sold`, `ad_is_special`, `ad_is_premium`) VALUES (33, 20, 83, 'YAMAHA VIRAGO', 'TRES BELLE MOTO VIROGO BLEU NUIT 20000KMS\r\nANNEE 91 PORTE BAGAGES PRIX 1800', 1174067919, 1210352319, 1202111599, 0, 0, 0, 0, 0, 381, 0.00, 0, 0.00, '0', 1, 0, 0, 0);

3.

CODE
CREATE TABLE `cl_ad` (

`ad_id` int(11) NOT NULL auto_increment,

`ad_owner` int(11) default '0',

`ad_cat_id` int(11) default '0',

`ad_title` varchar(255) default '0',

`ad_description` text,

`ad_date` int(11) default '0',

`ad_date_expire` int(11) default '0',

`ad_date_updated` int(11) default '0',

`ad_expires_after_days` int(11) default '0',

`ad_owner_notified` tinyint(1) default '0',

`ad_has_video` tinyint(1) default '0',

`ad_has_picture` tinyint(1) default '0',

`ad_has_doc` int(11) default '0',

`ad_views` int(11) default '0',

`ad_votes` double(6,2) default '0.00',

`ad_voters` int(11) default '0',

`ad_totalscore` double(6,2) default '0.00',

`ad_last_vote_ip` varchar(20) default '0',

`ad_is_validated` tinyint(1) default '0',

`ad_is_sold` tinyint(1) default '0',

`ad_is_special` tinyint(1) default '0',

`ad_is_premium` tinyint(1) default '0',

PRIMARY KEY (`ad_id`)

) TYPE=MyISAM AUTO_INCREMENT=534;

INSERT INTO `cl_ad` (`ad_id`, `ad_owner`, `ad_cat_id`, `ad_title`, `ad_description`, `ad_date`, `ad_date_expire`, `ad_date_updated`, `ad_expires_after_days`, `ad_owner_notified`, `ad_has_video`, `ad_has_picture`, `ad_has_doc`, `ad_views`, `ad_votes`, `ad_voters`, `ad_totalscore`, `ad_last_vote_ip`, `ad_is_validated`, `ad_is_sold`, `ad_is_special`, `ad_is_premium`) values('32', '20', '72', 'MAISON DE VILLAGE', 'TRES BELLE APPARTEMENT CLIMATISE DANS MAISON AU CENTRE DU VILLAGE', '1174066444', '1210350844', '1202111808', '0', '0', '0', '4', '0', '779', '0.00', '0', '0.00', '0', '1', '0', '0', '0');

INSERT INTO `cl_ad` (`ad_id`, `ad_owner`, `ad_cat_id`, `ad_title`, `ad_description`, `ad_date`, `ad_date_expire`, `ad_date_updated`, `ad_expires_after_days`, `ad_owner_notified`, `ad_has_video`, `ad_has_picture`, `ad_has_doc`, `ad_views`, `ad_votes`, `ad_voters`, `ad_totalscore`, `ad_last_vote_ip`, `ad_is_validated`, `ad_is_sold`, `ad_is_special`, `ad_is_premium`) values('33', '20', '83', 'YAMAHA VIRAGO', 'TRES BELLE MOTO VIROGO BLEU NUIT 20000KMS

ANNEE 91 PORTE BAGAGES PRIX 1800', '1174067919', '1210352319', '1202111599', '0', '0', '0', '0', '0', '352', '0.00', '0', '0.00', '0', '1', '0', '0', '0');

4.

CODE
create table cl_ad

(

ad_id int auto_increment primary key,

ad_owner int,

ad_cat_id int,

ad_title varchar(255),

ad_description text,

ad_date int,

ad_date_expire int,

ad_date_updated int,

ad_expires_after_days int,

ad_owner_notified int,

ad_has_video int,

ad_has_picture int,

ad_has_doc int,

ad_views int,

ad_votes real,

ad_voters int,

ad_totalscore real,

ad_last_vote_ip varchar(20),

ad_is_validated int,

ad_is_sold int,

ad_is_special int,

ad_is_premium int

);

insert into cl_ad (ad_id, ad_owner, ad_cat_id, ad_title, ad_description, ad_date, ad_date_expire, ad_date_updated, ad_expires_after_days, ad_owner_notified, ad_has_video, ad_has_picture, ad_has_doc, ad_views, ad_votes, ad_voters, ad_totalscore, ad_last_vote_ip, ad_is_validated, ad_is_sold, ad_is_special, ad_is_premium) values (32, 20, 72, "MAISON DE VILLAGE", "TRES BELLE APPARTEMENT CLIMATISE DANS MAISON AU CENTRE DU VILLAGE", 1174066444, 1210350844, 1202111808, 0, 0, 0, 4, 0, 755, 0, 0, 0, "0", 1, 0, 0, 0);

insert into cl_ad (ad_id, ad_owner, ad_cat_id, ad_title, ad_description, ad_date, ad_date_expire, ad_date_updated, ad_expires_after_days, ad_owner_notified, ad_has_video, ad_has_picture, ad_has_doc, ad_views, ad_votes, ad_voters, ad_totalscore, ad_last_vote_ip, ad_is_validated, ad_is_sold, ad_is_special, ad_is_premium) values (33, 20, 83, "YAMAHA VIRAGO", "TRES BELLE MOTO VIROGO BLEU NUIT 20000KMS\r\nANNEE 91 PORTE BAGAGES PRIX 1800", 1174067919, 1210352319, 1202111599, 0, 0, 0, 0, 0, 330, 0, 0, 0, "0", 1, 0, 0, 0);

Lien vers le commentaire
Partager sur d’autres sites

Hello,

là comme ça, c'est phpMyAdmin qui semble le plus fiable : il conserve la valeur courante de l'auto_increment, et les sauts de lignes dans les données sont échapés par sécurité.

Mais généralement ce n'est qu'une histoire d'options : si un des scripts de sauvegarde utilise "mysqldump", il y a une très grande quantité d'options permettant de sauvegarder ses données sans casse, et de manière bien plus efficace que phpmyadmin.

Lien vers le commentaire
Partager sur d’autres sites

Merci pour ta réponse.

Que penses tu du script phpMySQLAutoBackup ? exemple 1 (h**p://www.dwalker.co.uk/phpmysqlautobackup/)

Lien vers le commentaire
Partager sur d’autres sites

Veuillez vous connecter pour commenter

Vous pourrez laisser un commentaire après vous êtes connecté.



Connectez-vous maintenant
×
×
  • Créer...