Trace: » Data/Backup


=== Published by Jérémy Hernandez - Engineer Réseaux and Information systems Translation by jcoleman ===

Integrating project manager Free software (in particular OCS/GLPI)

1. Introduction

It is possible automatically to make a safeguard of the data of the table of the database glpi directly in the system.

Before all modifications, to refer to this documentation of the wiki:

2. Recommendations

For that, it is necessary to implement a small script bash which will carry out the safeguard and to deposit it in the ../glpi/files/_dumps repertory in the shape of a file .sql

It is necessary to thus envisage the rights of writing in this repertory. And to have accesses admin on the waiter of MySQL databases.

3. script

To create following script through your preferred text editor and to safeguard it with the .sh extension

#! /bin/sh
user= " - U root "
mdp= " - pvotremotdepasse "
chm= " /srv/www/htdocs/glpi/files/_dumps "
# Dump bases GLPI
mysqldump $user $mdp glpi > $chm/$ (date +%Y-%m-%d).glpi.backup.sql

4. Scheduling

The scheduler should now be parametrized, that is to say the crontab while launching the following order:

crontab - E

It is then necessary to add the following line to carry out the daily safeguard:

55 23 *** HS /srv/www/htdocs/glpi/

5. Results

Thus, base GLPI is safeguarded daily and is recopied in the repertory _dumps.

6. Advantages and benefit

The advantage of this automated backup makes it possible the administrator to have an instantaneous renewal of activity if base GLPI is corrupted in the night and thus to profit from a fresh backup of the day before.

- Jérémy Hernandez 2009/08/26 15:36 - -=)