Table of Contents

# Plan de sauvegarde et restauration du serveur NALC ## Quelques variables NALC-SERVER=/home/minetest/nalc-server-0.4.17-r1 bak=$NALC-SERVER/backup baktmp=/var/tmp/nalc-0.4dump logdir=$NALC-SERVER/logs ## Tableau des sauvegardes
Quoi Comment Depuis Vers Quand
$NALC-SERVER/minetest/minetest.conf cp $NALC-SERVER/shutdown.sh $bak/data/ 5h00
$NALC-SERVER/start.sh cp $NALC-SERVER/shutdown.sh $bak/data/ 5h00
$NALC-SERVER/backup.sh cp $NALC-SERVER/shutdown.sh $bak/data/ 5h00
$NALC-SERVER/minetest/worlds/nalc tar -I pbzip2 $NALC-SERVER/shutdown.sh $bak/data/world.tar.bz2 5h00
BDD nalc-0.4.17 pgdump -Fc $NALC-SERVER/shutdown.sh $baktmp/nalc-0.4.17.dump 5h00
BDD players-nalc-0.4.17 pgdump -Fc $NALC-SERVER/shutdown.sh $baktmp/players-nalc-0.4.17.dump 5h00
$baktmp/\*.dump tar $NALC-SERVER/shutdown.sh $bak/data/dumpsql.tar 5h00
$logdir/moredebug.log bzip2 && tar $NALC-SERVER/shutdown.sh $logdir/moredebug-logs.tar 5h00
## Étapes de restauration des BDD $ cd $NALC-SERVER $ mkdir dumps $ cd dumps $ tar -xvf $bak/data/dump_sql.tar $ dropdb nalc-0.4.17 $ dropdb players-nalc-0.4.17 $ createdb nalc-0.4.17 $ createdb players-nalc-0.4.17 $ (login as postgresql user) $ pg_restore -d nalc-0.4.17 $NALC-SERVER/dumps/nalc-0.4.17.dump $ pg_restore -d players-nalc-0.4.17 $NALC-SERVER/dumps/players-nalc-0.4.17.dump $ (logout) $ rm -rf $NALC-SERVER/dumps