Trace:

Differences

This shows you the differences between the selected revision and the current version of the page.

en:databackup 2015/07/03 09:46 current
Line 1: Line 1:
 +====== 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:
 +
 +http://www.glpi-project.org/wiki/doku.php?id=fr:config:crontab
 +===== 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. backup.sh script =====
 +
 +
 +To create following script through your preferred text editor and to safeguard it with the ** .sh ** extension
 +<code bash>
 +#! /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
 +</code>
 +===== 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:
 +<code bash>
 +55 23 *** HS /srv/www/htdocs/glpi/backup.sh
 +</code>
 +===== 5. Results =====
 +Thus, base GLPI is safeguarded daily and is recopied in the repertory _dumps.
 +
 +http://www.glpi-project.org/wiki/lib/exe/fetch.php?media=en:manuel:admin:test.gif
 +===== 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 - -=)
 +