You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2008-01-10 19:32:15

Wolfkin
Member
Registered: 2007-08-24
Posts: 3

Automatic backup of glpi database

I'm working on setting up a automatic backup of the mysql database we use for GLPI.

I've written the script following to call the mysqldump command

mysqldump -u ****** -p ******* -h localhost glpi > /var/www/html/glpi/files/_dumps/glpi-backup.sql

everything seems to be running correctly and the backup even shows up in the data area with the options to Delete, restore, view/download.

The problem or concern i am having is when i look at the file information and compare it to a dump I've done through the GLPI SQL dump option the files size is smaller and the data when I view them are different. 

Example

glpi-backup.sql                            449 kB        2008-01-10 11:11       Del        Restore        View/Download
glpi-0.7-2008-01-08-13-21.sql       551 kB       2008-01-08 13:21      Del       Restore       View/Download

Am I going to have an incomplete backup if I continue to run the backups in this way?

I know this is more of a mysql question but I'm just trying to figure out how the SQL dump function works in GLPI.  I don't want my database to be corrupted in a year or so and be unable to restore old records.

Thanks for any help.

Offline

#2 2008-01-10 20:25:44

JMD
GLPI - Lead
Registered: 2004-09-13
Posts: 9,180
Website

Re: Automatic backup of glpi database

Don't worry it's ok.

The diff  between this 2 db  is only a variant  of sql command format in each file.

In dump with mysql dump : only one command is used for "insert" for example all your cartridge.

In dump with glpi dump : for each element of cartridge, one command insert is used.


JMD / Jean-Mathieu Doléans - Glpi-project.org - Association Indepnet
Apportez votre pierre au  projet GLPI   : Soutenir

Offline

#3 2008-01-10 20:57:38

MoYo
GLPI - Lead
From: Poitiers
Registered: 2004-09-13
Posts: 14,513
Website

Re: Automatic backup of glpi database

yo uhave several method to export datas : row by row or complete etc etc
So size may be different to the same export.

for your problem you could see an existing script :
http://sourceforge.net/projects/automysqlbackup/


MoYo - Julien Dombre - Association INDEPNET
Contribute to GLPI :    Support     Contribute     References     Freshmeat

Offline

#4 2008-01-10 21:18:36

Wolfkin
Member
Registered: 2007-08-24
Posts: 3

Re: Automatic backup of glpi database

JMD wrote:

Don't worry it's ok.

The diff  between this 2 db  is only a variant  of sql command format in each file.

In dump with mysql dump : only one command is used for "insert" for example all your cartridge.

In dump with glpi dump : for each element of cartridge, one command insert is used.

Great I was hoping it was just a difference in the command or way i was backing up the database.

Thanks for clearing that up for me.

MoYo wrote:

yo uhave several method to export datas : row by row or complete etc etc
So size may be different to the same export.

for your problem you could see an existing script :
http://sourceforge.net/projects/automysqlbackup/

We are going to backing up the file to tape every night so the daily/weekly/monthly backup schedule might be a bit complex for our needs. 

Thanks again for the help,  and we are in the early stages of deployment, but glpi looks to be a great inventory management tool.  With the large changes you just made to the .70 release. I'm really looking forward to seeing where you take this package in the future.

Offline

#5 2008-01-11 01:42:24

JMD
GLPI - Lead
Registered: 2004-09-13
Posts: 9,180
Website

Re: Automatic backup of glpi database

Ok i close this subject.


JMD / Jean-Mathieu Doléans - Glpi-project.org - Association Indepnet
Apportez votre pierre au  projet GLPI   : Soutenir

Offline

Board footer

Powered by FluxBB