<?xml version="1.0" encoding="UTF-8" ?>

<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
    <title>Posteet: sauvegarde</title> 
    <link>http://www.posteet.com/</link> 
    <description>Recent posteets posted to Posteet</description>
    <ttl>60</ttl>

    
    <item>
        <title>Créer un fichier tar.gz à partir d'un fichier listant un certains nombres de fichiers</title>
        <link>http://www.posteet.com/view/1358</link>
        <description>
        <![CDATA[<pre>while read line; do
  tar -P -c -T - -f archive.tar.gz
done &lt; liste_diff.txt

Le fichier fourni en paramètre contient une liste de fichiers avec pour chacun le chemin absolu sur le serveur + nom du fichier. C’est pourquoi on rajoute l’option -P (--absolute-names) à la commande tar.

ATTENTION : Il faut laisser une ligne vide au début de fichier, sinon le premier fichier de la liste n’est pas pris en compte.

Voir aussi :
http://linuxfr.org/forums/30/21469.html</pre> <a href="http://www.posteet.com/tags/archive">[archive]</a>  <a href="http://www.posteet.com/tags/bash">[bash]</a>  <a href="http://www.posteet.com/tags/compression">[compression]</a>  <a href="http://www.posteet.com/tags/fichier">[fichier]</a>  <a href="http://www.posteet.com/tags/liste">[liste]</a>  <a href="http://www.posteet.com/tags/sauvegarde">[sauvegarde]</a>  <a href="http://www.posteet.com/tags/shell">[shell]</a> ]]>        </description>
        <dc:creator>cyo</dc:creator>
        <pubDate>Fri, 07 Nov 2008 14:47:21 +0000</pubDate>

            <category>archive</category>
            <category>bash</category>
            <category>compression</category>
            <category>fichier</category>
            <category>liste</category>
            <category>sauvegarde</category>
            <category>shell</category>
    
    </item>

  
    <item>
        <title>Backup (logique) et restauration MySQL</title>
        <link>http://www.posteet.com/view/436</link>
        <description>
        <![CDATA[<pre>Backup :
mysqldump -u root -pSuperMotDePasse --all-databases &gt; backup.sql

Restauration :
mysql -u root -pSuperMotDePasse &lt; backup.sql</pre> <a href="http://www.posteet.com/tags/backup">[backup]</a>  <a href="http://www.posteet.com/tags/mysql">[mysql]</a>  <a href="http://www.posteet.com/tags/restauration">[restauration]</a>  <a href="http://www.posteet.com/tags/sauvegarde">[sauvegarde]</a> ]]>        </description>
        <dc:creator>skymaxs</dc:creator>
        <pubDate>Thu, 15 Nov 2007 09:31:25 +0000</pubDate>

            <category>backup</category>
            <category>mysql</category>
            <category>restauration</category>
            <category>sauvegarde</category>
    
    </item>

  
    <item>
        <title>mysql_backup.sh</title>
        <link>http://www.posteet.com/view/125</link>
        <description>
        <![CDATA[<pre>#!/bin/bash

prefixe=backup
suffixe=$(date +%Y%m%d)
filename=$prefixe$suffixe.sql
host=host
database=database
user=user
characterSet=UTF8

mysqldump --skip-comments \
--complete-insert \
--default-character-set=$characterSet \
--no-create-info \
--skip-add-locks \
--skip-opt \
--host $host \
--user $user \
-p $database &gt; $filename

sed -i &quot;1iuse $database;\nSET CHARACTER SET '$characterSet';&quot; $filename
exit 0</pre> <a href="http://www.posteet.com/tags/backup">[backup]</a>  <a href="http://www.posteet.com/tags/bash">[bash]</a>  <a href="http://www.posteet.com/tags/data">[data]</a>  <a href="http://www.posteet.com/tags/données">[données]</a>  <a href="http://www.posteet.com/tags/mysql">[mysql]</a>  <a href="http://www.posteet.com/tags/sauvegarde">[sauvegarde]</a> ]]>        </description>
        <dc:creator>xavier</dc:creator>
        <pubDate>Sat, 03 Nov 2007 13:44:28 +0000</pubDate>

            <category>backup</category>
            <category>bash</category>
            <category>data</category>
            <category>données</category>
            <category>mysql</category>
            <category>sauvegarde</category>
    
    </item>

  
    <item>
        <title>Création d'un patch avec diff et restauration du patch</title>
        <link>http://www.posteet.com/view/22</link>
        <description>
        <![CDATA[<pre># Création du patch
diff -aburN --exclude=/etc/aexclure /repertoire/reference /repertoire/modifie &gt; patch.diff
# a: traite tous les fichiers comme du texte
# b: ignore les différences sur les espaces
# u: faire un patch unifié
# r: récursif
# N: fichiers nouveaux
# --exclude=&lt;&gt;: exclure des fichiers ou répertoires

# Restauration du patch sur arborescence de référence 
# Se placer dans l'arborescence de référence
patch -Np1 &lt; patch.diff
# N: ignorer les patchs qui semblent avoir été renversés ou déjà appliqués</pre> <a href="http://www.posteet.com/tags/diff">[diff]</a>  <a href="http://www.posteet.com/tags/patch">[patch]</a>  <a href="http://www.posteet.com/tags/sauvegarde">[sauvegarde]</a> ]]>        </description>
        <dc:creator>spirit</dc:creator>
        <pubDate>Mon, 24 Sep 2007 07:08:19 +0000</pubDate>

            <category>diff</category>
            <category>patch</category>
            <category>sauvegarde</category>
    
    </item>


</channel>
</rss>
