<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="fr">
	<id>https://wiki.slemoal.fr/index.php?action=history&amp;feed=atom&amp;title=Xivo_backup_ftp</id>
	<title>Xivo backup ftp - Historique des versions</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.slemoal.fr/index.php?action=history&amp;feed=atom&amp;title=Xivo_backup_ftp"/>
	<link rel="alternate" type="text/html" href="https://wiki.slemoal.fr/index.php?title=Xivo_backup_ftp&amp;action=history"/>
	<updated>2026-04-28T17:04:35Z</updated>
	<subtitle>Historique des révisions pour cette page sur le wiki</subtitle>
	<generator>MediaWiki 1.34.1</generator>
	<entry>
		<id>https://wiki.slemoal.fr/index.php?title=Xivo_backup_ftp&amp;diff=832&amp;oldid=prev</id>
		<title>Admin le 13 mai 2020 à 13:33</title>
		<link rel="alternate" type="text/html" href="https://wiki.slemoal.fr/index.php?title=Xivo_backup_ftp&amp;diff=832&amp;oldid=prev"/>
		<updated>2020-05-13T13:33:30Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;fr&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Version précédente&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Version du 13 mai 2020 à 13:33&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l65&quot; &gt;Ligne 65 :&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Ligne 65 :&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;exit 0&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;exit 0&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;# &lt;/del&gt;mettre les bon droits sur le fichier&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;mettre les bon droits sur le fichier&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  chmod +X /etc/custom/backup-ftp.sh&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  chmod +X /etc/custom/backup-ftp.sh&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;# &lt;/del&gt;tester en lançant la commande (ça peut prendre plusieurs minute)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;tester en lançant la commande (ça peut prendre plusieurs minute)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  sh /etc/cron.monthly/backup-ftp.sh&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  sh /etc/cron.monthly/backup-ftp.sh&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;# &lt;/del&gt;automatiser la sauvegarde&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;automatiser la sauvegarde&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  vi /etc/crontab&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  vi /etc/crontab&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.slemoal.fr/index.php?title=Xivo_backup_ftp&amp;diff=831&amp;oldid=prev</id>
		<title>Admin le 13 mai 2020 à 13:32</title>
		<link rel="alternate" type="text/html" href="https://wiki.slemoal.fr/index.php?title=Xivo_backup_ftp&amp;diff=831&amp;oldid=prev"/>
		<updated>2020-05-13T13:32:36Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;fr&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Version précédente&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Version du 13 mai 2020 à 13:32&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l51&quot; &gt;Ligne 51 :&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Ligne 51 :&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;echo &amp;quot;fin de la compression des fichiers de sauvegarde&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;echo &amp;quot;fin de la compression des fichiers de sauvegarde&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Copie du fichier de sauvegarde vers le serveur FTP &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Tiscom&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Copie du fichier de sauvegarde vers le serveur FTP&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;echo &amp;quot;connexion au serveur FTP &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Tiscom&lt;/del&gt;&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;echo &amp;quot;connexion au serveur FTP&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;ftp -n $HOST_FTP &amp;lt;&amp;lt;END_SCRIPT&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;ftp -n $HOST_FTP &amp;lt;&amp;lt;END_SCRIPT&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;quote USER $USER_FTP&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;quote USER $USER_FTP&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.slemoal.fr/index.php?title=Xivo_backup_ftp&amp;diff=830&amp;oldid=prev</id>
		<title>Admin : Page créée avec « mettre les paquets à jour  apt-get update  changer la liste de dépôt si apt-get update affiche des messages d'erreur  &lt;nowiki&gt;cd /etc/apt find . -type f -exec sed -i 's… »</title>
		<link rel="alternate" type="text/html" href="https://wiki.slemoal.fr/index.php?title=Xivo_backup_ftp&amp;diff=830&amp;oldid=prev"/>
		<updated>2020-05-13T13:31:38Z</updated>

		<summary type="html">&lt;p&gt;Page créée avec « mettre les paquets à jour  apt-get update  changer la liste de dépôt si apt-get update affiche des messages d&amp;#039;erreur  &amp;lt;nowiki&amp;gt;cd /etc/apt find . -type f -exec sed -i &amp;#039;s… »&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Nouvelle page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;mettre les paquets à jour&lt;br /&gt;
 apt-get update&lt;br /&gt;
&lt;br /&gt;
changer la liste de dépôt si apt-get update affiche des messages d'erreur&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;cd /etc/apt&lt;br /&gt;
find . -type f -exec sed -i 's/ftp.fr.debian.org/archive.debian.org/g' {} \;&lt;br /&gt;
find . -type f -exec sed -i 's/volatile.debian.org/archive.debian.org/g' {} \;&lt;br /&gt;
find . -type f -exec sed -i 's/security.debian.org/archive.debian.org\/debian-security/g' {} \;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Installer client ftp&lt;br /&gt;
 apt-get install ftp&lt;br /&gt;
&lt;br /&gt;
On va se servir de Cron pour la planification des taches&lt;br /&gt;
&lt;br /&gt;
activer Cron au démarrage&lt;br /&gt;
 update-rc.d cron defaults&lt;br /&gt;
&lt;br /&gt;
Créer backup-ftp.sh en prenant soin de modifier les variables&lt;br /&gt;
 vi /etc/custom/backup-ftp.sh&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot; line&amp;gt;#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
# Definition des variables.&lt;br /&gt;
CLIENT=&amp;quot;Nom du client&amp;quot;&lt;br /&gt;
HOST_FTP=&amp;quot;IP du serveur FTP&amp;quot;&lt;br /&gt;
USER_FTP=&amp;quot;user ftp&amp;quot;&lt;br /&gt;
PASSWD_FTP=&amp;quot;Mot de passe ftp&amp;quot;&lt;br /&gt;
date=$(date '+%d-%m-%Y')&lt;br /&gt;
backups=&amp;quot;/home/backups&amp;quot;&lt;br /&gt;
data=&amp;quot;/home/backups/data.tar.gz&amp;quot;&lt;br /&gt;
db=&amp;quot;/home/backups/db.tar.gz&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# affiche la date&lt;br /&gt;
echo $date&lt;br /&gt;
&lt;br /&gt;
# Creation du repertoire de backup si ils n'existent pas&lt;br /&gt;
if [ ! -d $backups ]&lt;br /&gt;
	then&lt;br /&gt;
		echo &amp;quot;le repertoire de sauvegarde n'existe pas&amp;quot;&lt;br /&gt;
		echo &amp;quot;creation du repertoire $backups&amp;quot;&lt;br /&gt;
		/bin/mkdir $backups&lt;br /&gt;
		/bin/chmod 777 $backups&lt;br /&gt;
	else&lt;br /&gt;
		echo &amp;quot;le repertoire de sauvegarde existe&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
# Compression des fichiers de sauvegarde&lt;br /&gt;
echo &amp;quot;debut de la compression des fichiers de sauvegarde&amp;quot;&lt;br /&gt;
/usr/sbin/pf-xivo-backup data $data&lt;br /&gt;
/usr/sbin/pf-xivo-backup db $db&lt;br /&gt;
echo &amp;quot;fin de la compression des fichiers de sauvegarde&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Copie du fichier de sauvegarde vers le serveur FTP Tiscom&lt;br /&gt;
echo &amp;quot;connexion au serveur FTP Tiscom&amp;quot;&lt;br /&gt;
ftp -n $HOST_FTP &amp;lt;&amp;lt;END_SCRIPT&lt;br /&gt;
quote USER $USER_FTP&lt;br /&gt;
quote PASS $PASSWD_FTP&lt;br /&gt;
mkdir $CLIENT/$date&lt;br /&gt;
cd $CLIENT/$date&lt;br /&gt;
put $data data.tar.gz&lt;br /&gt;
put $db db.tar.gz&lt;br /&gt;
bye&lt;br /&gt;
END_SCRIPT&lt;br /&gt;
echo &amp;quot;fin du transfert&amp;quot;&lt;br /&gt;
exit 0&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# mettre les bon droits sur le fichier&lt;br /&gt;
 chmod +X /etc/custom/backup-ftp.sh&lt;br /&gt;
&lt;br /&gt;
# tester en lançant la commande (ça peut prendre plusieurs minute)&lt;br /&gt;
 sh /etc/cron.monthly/backup-ftp.sh&lt;br /&gt;
&lt;br /&gt;
# automatiser la sauvegarde&lt;br /&gt;
 vi /etc/crontab&lt;br /&gt;
&lt;br /&gt;
ajouter les 2 lignes ci-dessous à la fin du fichier&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;# Sauvegarde automatique vers le serveur ftp tous les 1er du mois à 4h00&lt;br /&gt;
00 4    1 * *   root    sh /etc/custom/backup-ftp.sh&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
</feed>