Files
wiki.timour.net/S6.html
2020-11-24 18:45:43 +01:00

223 lines
35 KiB
HTML
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html><html lang="fr">
<head>
<title>6 Sauvegardes‣ Compilation de commandes utiles régulièrement, ou pas</title>
<!--Generated on Tue Nov 24 18:44:33 2020 by LaTeXML (version 0.8.3) http://dlmf.nist.gov/LaTeXML/.-->
<!--Document created on .-->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="LaTeXML.css" type="text/css">
<link rel="stylesheet" href="ltx-article.css" type="text/css">
<link rel="stylesheet" href="ltx-listings.css" type="text/css">
<link rel="up" href="./" title="Compilation de commandes utiles régulièrement, ou pas">
<link rel="start" href="./" title="Compilation de commandes utiles régulièrement, ou pas">
<link rel="prev" href="S5.html" title="5 Yunohost, Brique Internet et autres serveur-like tips ‣ Compilation de commandes utiles régulièrement, ou pas">
<link rel="next" href="S7.html" title="7 Logiciels ‣ Compilation de commandes utiles régulièrement, ou pas">
<link rel="section" href="S1.html" title="1 Commandes usuelles ‣ Compilation de commandes utiles régulièrement, ou pas">
<link rel="section" href="S2.html" title="2 Installations ‣ Compilation de commandes utiles régulièrement, ou pas">
<link rel="section" href="S3.html" title="3 Manjaro - Arch Linux ‣ Compilation de commandes utiles régulièrement, ou pas">
<link rel="section" href="S4.html" title="4 Awesome WM et la customisation avancée ‣ Compilation de commandes utiles régulièrement, ou pas">
<link rel="section" href="S5.html" title="5 Yunohost, Brique Internet et autres serveur-like tips ‣ Compilation de commandes utiles régulièrement, ou pas">
<link rel="section" href="S7.html" title="7 Logiciels ‣ Compilation de commandes utiles régulièrement, ou pas">
<link rel="section" href="S8.html" title="8 Développement Web ‣ Compilation de commandes utiles régulièrement, ou pas">
<link rel="section" href="S9.html" title="9 Internet ‣ Compilation de commandes utiles régulièrement, ou pas">
<link rel="section" href="S10.html" title="10 Vie privée ‣ Compilation de commandes utiles régulièrement, ou pas">
<link rel="section" href="S11.html" title="11 Bugs divers ‣ Compilation de commandes utiles régulièrement, ou pas">
<link rel="section" href="S12.html" title="12 Divers ‣ Compilation de commandes utiles régulièrement, ou pas">
<link rel="section" href="S13.html" title="13 Windows ‣ Compilation de commandes utiles régulièrement, ou pas">
<link rel="section" href="S14.html" title="14 Réparation ‣ Compilation de commandes utiles régulièrement, ou pas">
<link rel="section" href="S15.html" title="15 Annexes - Scripts ‣ Compilation de commandes utiles régulièrement, ou pas">
</head>
<body>
<div class="ltx_page_main">
<header class="ltx_page_header">
<div>
<a href="./" title="Compilation de commandes utiles régulièrement, ou pas" class="ltx_ref" rel="up"><span class="ltx_text ltx_ref_title">Compilation de commandes utiles régulièrement, ou pas<span class="ltx_text"> </span></span></a><a href="S5.html" title="5 Yunohost, Brique Internet et autres serveur-like tips ‣ Compilation de commandes utiles régulièrement, ou pas" class="ltx_ref" rel="prev"><span class="ltx_text ltx_ref_title"><span class="ltx_tag ltx_tag_ref">5 </span>Yunohost, Brique Internet et autres serveur-like tips</span></a><a href="S7.html" title="7 Logiciels ‣ Compilation de commandes utiles régulièrement, ou pas" class="ltx_ref" rel="next"><span class="ltx_text ltx_ref_title"><span class="ltx_tag ltx_tag_ref">7 </span>Logiciels</span></a>
</div></header>
<div class="ltx_page_content">
<section class="ltx_section ltx_authors_1line" lang="fr">
<h1 class="ltx_title ltx_title_section">
<span class="ltx_tag ltx_tag_section">6 </span>Sauvegardes</h1>
<div class="ltx_date ltx_role_creation"></div>
<section id="SS1" class="ltx_subsection">
<h2 class="ltx_title ltx_title_subsection">
<span class="ltx_tag ltx_tag_subsection">6.1 </span>Serveur Yunohost</h2>
<div id="SS1.p1" class="ltx_para">
<p class="ltx_p"><a href="https://yunohost.org/#/backup" title="" class="ltx_ref ltx_url ltx_font_typewriter">https://yunohost.org/#/backup</a></p>
</div>
</section>
<section id="SS2" class="ltx_subsection">
<h2 class="ltx_title ltx_title_subsection">
<span class="ltx_tag ltx_tag_subsection">6.2 </span>Android - Utilisation de adb</h2>
<div id="SS2.p1" class="ltx_para">
<p class="ltx_p">Installation :</p>
<div class="ltx_listing ltx_lst_language_bash ltx_lstlisting ltx_listing" style="background-color:#BFBFBF;">
<div class="ltx_listing_data"><a href="data:text/plain;base64,c3VkbyBhcHQtZ2V0IGluc3RhbGwgYW5kcm9pZC10b29scy1hZGIgYW5kcm9pZC10b29scy1mYXN0Ym9vdA=="></a></div>
<div id="lstnumberx101" class="ltx_listingline">
<span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">sudo</span><span class="ltx_text ltx_lst_space ltx_font_typewriter" style="font-size:90%;"> </span><span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">apt</span><span class="ltx_text ltx_font_typewriter" style="font-size:90%;">-</span><span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">get</span><span class="ltx_text ltx_lst_space ltx_font_typewriter" style="font-size:90%;"> </span><span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">install</span><span class="ltx_text ltx_lst_space ltx_font_typewriter" style="font-size:90%;"> </span><span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">android</span><span class="ltx_text ltx_font_typewriter" style="font-size:90%;">-</span><span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">tools</span><span class="ltx_text ltx_font_typewriter" style="font-size:90%;">-</span><span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">adb</span><span class="ltx_text ltx_lst_space ltx_font_typewriter" style="font-size:90%;"> </span><span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">android</span><span class="ltx_text ltx_font_typewriter" style="font-size:90%;">-</span><span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">tools</span><span class="ltx_text ltx_font_typewriter" style="font-size:90%;">-</span><span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">fastboot</span>
</div>
</div>
<p class="ltx_p">Détection :</p>
<div class="ltx_listing ltx_lst_language_bash ltx_lstlisting ltx_listing" style="background-color:#BFBFBF;">
<div class="ltx_listing_data"><a href="data:text/plain;base64,YWRiIGRldmljZXM="></a></div>
<div id="lstnumberx102" class="ltx_listingline">
<span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">adb</span><span class="ltx_text ltx_lst_space ltx_font_typewriter" style="font-size:90%;"> </span><span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">devices</span>
</div>
</div>
<p class="ltx_p">Sauvegarde :</p>
<div class="ltx_listing ltx_lst_language_bash ltx_lstlisting ltx_listing" style="background-color:#BFBFBF;">
<div class="ltx_listing_data"><a href="data:text/plain;base64,YWRiIGJhY2t1cCAtYXBrIC1zaGFyZWQgLWFsbCAtZiBiYWNrdXAuYWI="></a></div>
<div id="lstnumberx103" class="ltx_listingline">
<span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">adb</span><span class="ltx_text ltx_lst_space ltx_font_typewriter" style="font-size:90%;"> </span><span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">backup</span><span class="ltx_text ltx_lst_space ltx_font_typewriter" style="font-size:90%;"> </span><span class="ltx_text ltx_font_typewriter" style="font-size:90%;">-</span><span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">apk</span><span class="ltx_text ltx_lst_space ltx_font_typewriter" style="font-size:90%;"> </span><span class="ltx_text ltx_font_typewriter" style="font-size:90%;">-</span><span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">shared</span><span class="ltx_text ltx_lst_space ltx_font_typewriter" style="font-size:90%;"> </span><span class="ltx_text ltx_font_typewriter" style="font-size:90%;">-</span><span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">all</span><span class="ltx_text ltx_lst_space ltx_font_typewriter" style="font-size:90%;"> </span><span class="ltx_text ltx_font_typewriter" style="font-size:90%;">-</span><span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">f</span><span class="ltx_text ltx_lst_space ltx_font_typewriter" style="font-size:90%;"> </span><span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">backup</span><span class="ltx_text ltx_font_typewriter" style="font-size:90%;">.</span><span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">ab</span>
</div>
</div>
<p class="ltx_p">Restaurer :</p>
<div class="ltx_listing ltx_lst_language_bash ltx_lstlisting ltx_listing" style="background-color:#BFBFBF;">
<div class="ltx_listing_data"><a href="data:text/plain;base64,YWRiIHJlc3RvcmUgYmFja3VwLmFi"></a></div>
<div id="lstnumberx104" class="ltx_listingline">
<span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">adb</span><span class="ltx_text ltx_lst_space ltx_font_typewriter" style="font-size:90%;"> </span><span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">restore</span><span class="ltx_text ltx_lst_space ltx_font_typewriter" style="font-size:90%;"> </span><span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">backup</span><span class="ltx_text ltx_font_typewriter" style="font-size:90%;">.</span><span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">ab</span>
</div>
</div>
</div>
</section>
<section id="SS3" class="ltx_subsection">
<h2 class="ltx_title ltx_title_subsection">
<span class="ltx_tag ltx_tag_subsection">6.3 </span>GNU-Linux</h2>
<section id="SS3.SSS1" class="ltx_subsubsection">
<h3 class="ltx_title ltx_title_subsubsection">
<span class="ltx_tag ltx_tag_subsubsection">6.3.1 </span>Le paquet rsync</h3>
<div id="SS3.SSS1.p1" class="ltx_para ltx_noindent">
<p class="ltx_p">Le paquet <span class="ltx_text ltx_emph ltx_font_italic">rsync</span> permet de sauvegarder ses données par copies. Il copie tous les fichiers sources vers la destination que vous avez choisie. Ensuite, il ne mettra à jour que ceux qui ont été modifiés ou ajoutés. Doù un gain de temps. De plus, rsync peut aussi être utilisé à travers un réseau.
<br class="ltx_break"></p>
</div>
<div id="SS3.SSS1.p2" class="ltx_para ltx_noindent">
<p class="ltx_p"><span class="ltx_text ltx_font_smallcaps">Syntaxe de base</span> : <span class="ltx_text ltx_font_bold">rsync [option] /source /destination
<br class="ltx_break"></span></p>
</div>
<div id="SS3.SSS1.p3" class="ltx_para ltx_noindent">
<p class="ltx_p">Copier un dossier intégralement</p>
<div class="ltx_listing ltx_lst_language_bash ltx_lstlisting ltx_listing" style="background-color:#BFBFBF;">
<div class="ltx_listing_data"><a href="data:text/plain;base64,cnN5bmMgLWF2IC9zb3VyY2UgL2Rlc3RpbmF0aW9u"></a></div>
<div id="lstnumberx105" class="ltx_listingline">
<span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">rsync</span><span class="ltx_text ltx_lst_space ltx_font_typewriter" style="font-size:90%;"> </span><span class="ltx_text ltx_font_typewriter" style="font-size:90%;">-</span><span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">av</span><span class="ltx_text ltx_lst_space ltx_font_typewriter" style="font-size:90%;"> </span><span class="ltx_text ltx_font_typewriter" style="font-size:90%;">/</span><span class="ltx_text ltx_lst_keyword ltx_font_typewriter" style="font-size:90%;color:#0000FF;">source</span><span class="ltx_text ltx_lst_space ltx_font_typewriter" style="font-size:90%;"> </span><span class="ltx_text ltx_font_typewriter" style="font-size:90%;">/</span><span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">destination</span>
</div>
</div>
<p class="ltx_p">Copier seulement son contenu</p>
<div class="ltx_listing ltx_lst_language_bash ltx_lstlisting ltx_listing" style="background-color:#BFBFBF;">
<div class="ltx_listing_data"><a href="data:text/plain;base64,cnN5bmMgLWF2IC9zb3VyY2UvIC9kZXN0aW5hdGlvbg=="></a></div>
<div id="lstnumberx106" class="ltx_listingline">
<span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">rsync</span><span class="ltx_text ltx_lst_space ltx_font_typewriter" style="font-size:90%;"> </span><span class="ltx_text ltx_font_typewriter" style="font-size:90%;">-</span><span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">av</span><span class="ltx_text ltx_lst_space ltx_font_typewriter" style="font-size:90%;"> </span><span class="ltx_text ltx_font_typewriter" style="font-size:90%;">/</span><span class="ltx_text ltx_lst_keyword ltx_font_typewriter" style="font-size:90%;color:#0000FF;">source</span><span class="ltx_text ltx_font_typewriter" style="font-size:90%;">/</span><span class="ltx_text ltx_lst_space ltx_font_typewriter" style="font-size:90%;"> </span><span class="ltx_text ltx_font_typewriter" style="font-size:90%;">/</span><span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">destination</span>
</div>
</div>
<p class="ltx_p"><span class="ltx_text ltx_font_bold">Transfert via SSH, avec un port spécifique</span></p>
<div class="ltx_listing ltx_lst_language_bash ltx_lstlisting ltx_listing" style="background-color:#BFBFBF;">
<div class="ltx_listing_data"><a href="data:text/plain;base64,cnN5bmMgLWF2emggLWUgInNzaCAtcCAkUE9SVCIgLS1wcm9ncmVzcyAvc291cmNlLyB1c2VyQGRvbWFpbi5uZXQ6L2Rlc3RpbmF0aW9uLw=="></a></div>
<div id="lstnumberx107" class="ltx_listingline">
<span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">rsync</span><span class="ltx_text ltx_lst_space ltx_font_typewriter" style="font-size:90%;"> </span><span class="ltx_text ltx_font_typewriter" style="font-size:90%;">-</span><span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">avzh</span><span class="ltx_text ltx_lst_space ltx_font_typewriter" style="font-size:90%;"> </span><span class="ltx_text ltx_font_typewriter" style="font-size:90%;">-</span><span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">e</span><span class="ltx_text ltx_lst_space ltx_font_typewriter" style="font-size:90%;"> </span><span class="ltx_text ltx_lst_string ltx_font_typewriter" style="font-size:90%;color:#820210;">"ssh<span class="ltx_text ltx_lst_space"> </span>-p<span class="ltx_text ltx_lst_space"> </span>$PORT"</span><span class="ltx_text ltx_lst_space ltx_font_typewriter" style="font-size:90%;"> </span><span class="ltx_text ltx_font_typewriter" style="font-size:90%;">--</span><span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">progress</span><span class="ltx_text ltx_lst_space ltx_font_typewriter" style="font-size:90%;"> </span><span class="ltx_text ltx_font_typewriter" style="font-size:90%;">/</span><span class="ltx_text ltx_lst_keyword ltx_font_typewriter" style="font-size:90%;color:#0000FF;">source</span><span class="ltx_text ltx_font_typewriter" style="font-size:90%;">/</span><span class="ltx_text ltx_lst_space ltx_font_typewriter" style="font-size:90%;"> </span><span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">user@domain</span><span class="ltx_text ltx_font_typewriter" style="font-size:90%;">.</span><span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">net</span><span class="ltx_text ltx_font_typewriter" style="font-size:90%;">:/</span><span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">destination</span><span class="ltx_text ltx_font_typewriter" style="font-size:90%;">/</span>
</div>
</div>
<p class="ltx_p">Lors dun téléchargement distant par ssh, en cas de coupure</p>
<div class="ltx_listing ltx_lst_language_bash ltx_lstlisting ltx_listing" style="background-color:#BFBFBF;">
<div class="ltx_listing_data"><a href="data:text/plain;base64,cnN5bmMgLS1wYXJ0aWFsIC0tcHJvZ3Jlc3MgLS1yc2g9c3NoIFtzb3VyY2VdIFt1c2VyXUBbaG9zdF06W2Rlc3RpbmF0aW9uXQ=="></a></div>
<div id="lstnumberx108" class="ltx_listingline">
<span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">rsync</span><span class="ltx_text ltx_lst_space ltx_font_typewriter" style="font-size:90%;"> </span><span class="ltx_text ltx_font_typewriter" style="font-size:90%;">--</span><span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">partial</span><span class="ltx_text ltx_lst_space ltx_font_typewriter" style="font-size:90%;"> </span><span class="ltx_text ltx_font_typewriter" style="font-size:90%;">--</span><span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">progress</span><span class="ltx_text ltx_lst_space ltx_font_typewriter" style="font-size:90%;"> </span><span class="ltx_text ltx_font_typewriter" style="font-size:90%;">--</span><span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">rsh</span><span class="ltx_text ltx_font_typewriter" style="font-size:90%;">=</span><span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">ssh</span><span class="ltx_text ltx_lst_space ltx_font_typewriter" style="font-size:90%;"> </span><span class="ltx_text ltx_font_typewriter" style="font-size:90%;">[</span><span class="ltx_text ltx_lst_keyword ltx_font_typewriter" style="font-size:90%;color:#0000FF;">source</span><span class="ltx_text ltx_font_typewriter" style="font-size:90%;">]</span><span class="ltx_text ltx_lst_space ltx_font_typewriter" style="font-size:90%;"> </span><span class="ltx_text ltx_font_typewriter" style="font-size:90%;">[</span><span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">user</span><span class="ltx_text ltx_font_typewriter" style="font-size:90%;">]</span><span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">@</span><span class="ltx_text ltx_font_typewriter" style="font-size:90%;">[</span><span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">host</span><span class="ltx_text ltx_font_typewriter" style="font-size:90%;">]:[</span><span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">destination</span><span class="ltx_text ltx_font_typewriter" style="font-size:90%;">]</span>
</div>
</div>
<p class="ltx_p">Loption <span class="ltx_text ltx_font_bold">partial</span> relance depuis le point darrêt, <span class="ltx_text ltx_font_bold">progress</span> affiche la progression et <span class="ltx_text ltx_font_bold">rsh=ssh</span> sécurise le transfert.
<br class="ltx_break"></p>
</div>
<div id="SS3.SSS1.p4" class="ltx_para ltx_noindent">
<p class="ltx_p"><span class="ltx_text ltx_font_bold">Exemple</span> :</p>
<div class="ltx_listing ltx_lst_language_bash ltx_lstlisting ltx_listing" style="background-color:#BFBFBF;">
<div class="ltx_listing_data"><a href="data:text/plain;base64,cnN5bmMgLXIgLXQgLXggLXYgLW4gLS1wcm9ncmVzcyAtbCAtcyAtLWZpbHRlciAiLSAvLmNhY2hlLyIgLS1maWx0ZXIgIi0gLy50aHVtYm5haWxzLyIgLS1maWx0ZXIgIisgamVWZXV4Q2VsdWlDaS50eHQiIC9ob21lL3V0aWxpc2F0ZXVyLyAvbWVkaWEvRGlzcXVlRXh0ZXJuZS9yZXBlcnRvaXJlX3NhdXZlZ2FyZGUvIHwgbW9yZQ=="></a></div>
<div id="lstnumberx109" class="ltx_listingline">
<span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">rsync</span><span class="ltx_text ltx_lst_space ltx_font_typewriter" style="font-size:90%;"> </span><span class="ltx_text ltx_font_typewriter" style="font-size:90%;">-</span><span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">r</span><span class="ltx_text ltx_lst_space ltx_font_typewriter" style="font-size:90%;"> </span><span class="ltx_text ltx_font_typewriter" style="font-size:90%;">-</span><span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">t</span><span class="ltx_text ltx_lst_space ltx_font_typewriter" style="font-size:90%;"> </span><span class="ltx_text ltx_font_typewriter" style="font-size:90%;">-</span><span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">x</span><span class="ltx_text ltx_lst_space ltx_font_typewriter" style="font-size:90%;"> </span><span class="ltx_text ltx_font_typewriter" style="font-size:90%;">-</span><span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">v</span><span class="ltx_text ltx_lst_space ltx_font_typewriter" style="font-size:90%;"> </span><span class="ltx_text ltx_font_typewriter" style="font-size:90%;">-</span><span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">n</span><span class="ltx_text ltx_lst_space ltx_font_typewriter" style="font-size:90%;"> </span><span class="ltx_text ltx_font_typewriter" style="font-size:90%;">--</span><span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">progress</span><span class="ltx_text ltx_lst_space ltx_font_typewriter" style="font-size:90%;"> </span><span class="ltx_text ltx_font_typewriter" style="font-size:90%;">-</span><span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">l</span><span class="ltx_text ltx_lst_space ltx_font_typewriter" style="font-size:90%;"> </span><span class="ltx_text ltx_font_typewriter" style="font-size:90%;">-</span><span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">s</span><span class="ltx_text ltx_lst_space ltx_font_typewriter" style="font-size:90%;"> </span><span class="ltx_text ltx_font_typewriter" style="font-size:90%;">--</span><span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">filter</span><span class="ltx_text ltx_lst_space ltx_font_typewriter" style="font-size:90%;"> </span><span class="ltx_text ltx_lst_string ltx_font_typewriter" style="font-size:90%;color:#820210;">"-<span class="ltx_text ltx_lst_space"> </span>/.cache/"</span><span class="ltx_text ltx_lst_space ltx_font_typewriter" style="font-size:90%;"> </span><span class="ltx_text ltx_font_typewriter" style="font-size:90%;">--</span><span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">filter</span><span class="ltx_text ltx_lst_space ltx_font_typewriter" style="font-size:90%;"> </span><span class="ltx_text ltx_lst_string ltx_font_typewriter" style="font-size:90%;color:#820210;">"-<span class="ltx_text ltx_lst_space"> </span>/.thumbnails/"</span><span class="ltx_text ltx_lst_space ltx_font_typewriter" style="font-size:90%;"> </span><span class="ltx_text ltx_font_typewriter" style="font-size:90%;">--</span><span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">filter</span><span class="ltx_text ltx_lst_space ltx_font_typewriter" style="font-size:90%;"> </span><span class="ltx_text ltx_lst_string ltx_font_typewriter" style="font-size:90%;color:#820210;">"+<span class="ltx_text ltx_lst_space"> </span>jeVeuxCeluiCi.txt"</span><span class="ltx_text ltx_lst_space ltx_font_typewriter" style="font-size:90%;"> </span><span class="ltx_text ltx_font_typewriter" style="font-size:90%;">/</span><span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">home</span><span class="ltx_text ltx_font_typewriter" style="font-size:90%;">/</span><span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">utilisateur</span><span class="ltx_text ltx_font_typewriter" style="font-size:90%;">/</span><span class="ltx_text ltx_lst_space ltx_font_typewriter" style="font-size:90%;"> </span><span class="ltx_text ltx_font_typewriter" style="font-size:90%;">/</span><span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">media</span><span class="ltx_text ltx_font_typewriter" style="font-size:90%;">/</span><span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">DisqueExterne</span><span class="ltx_text ltx_font_typewriter" style="font-size:90%;">/</span><span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">repertoire_sauvegarde</span><span class="ltx_text ltx_font_typewriter" style="font-size:90%;">/</span><span class="ltx_text ltx_lst_space ltx_font_typewriter" style="font-size:90%;"> </span><span class="ltx_text ltx_font_typewriter" style="font-size:90%;">|</span><span class="ltx_text ltx_lst_space ltx_font_typewriter" style="font-size:90%;"> </span><span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">more</span>
</div>
</div>
<p class="ltx_p">-r fait une copie récursive
<br class="ltx_break">-S, traite les fichiers à trous efficacement
<br class="ltx_break">-x, ne traverse pas les limites du système de fichiers
<br class="ltx_break">-n, simule la sauvegarde sans ne rien faire réellement
<br class="ltx_break">progress affiche la progression
<br class="ltx_break">filter permet de désigner les dossiers que lon ne veut pas sauvegarder (signe -) ou que lon veut ajouter à la liste (signe +)
<br class="ltx_break"><span class="ltx_text ltx_emph ltx_font_italic">enlever le -n et |more pour que la sauvegarde se fasse une fois satisfait.
<br class="ltx_break"></span></p>
</div>
<div id="SS3.SSS1.p5" class="ltx_para ltx_noindent">
<p class="ltx_p"><span class="ltx_text ltx_font_bold">Interfaces graphiques disponibles</span> : grsync et luckybackup
<br class="ltx_break"></p>
</div>
<div id="SS3.SSS1.p6" class="ltx_para">
<p class="ltx_p"><span class="ltx_text ltx_font_smallcaps">Documentation :</span> <a href="https://debian-facile.org/doc:reseau:rsync" title="" class="ltx_ref ltx_url ltx_font_typewriter">https://debian-facile.org/doc:reseau:rsync</a>
<br class="ltx_break"></p>
</div>
</section>
<section id="SS3.SSS2" class="ltx_subsubsection">
<h3 class="ltx_title ltx_title_subsubsection">
<span class="ltx_tag ltx_tag_subsubsection">6.3.2 </span>Sauvegarde complète de Debian avec un script</h3>
<div id="SS3.SSS2.p1" class="ltx_para">
<p class="ltx_p">À laide du paquet présenté ci-dessus il est possible de créer un ou des scripts qui sauvegarderont vos données sur un disque externe ou même sur le réseau. Je décris ici la méthode pour une sauvegarde de la racine (fichier de configuration, paquets, réglages des paquets, etc) et des fichiers personnels.
<br class="ltx_break"><span class="ltx_text ltx_emph ltx_font_italic">Cette partie demande de connaître lorganisation des fichiers dans un système GNU/Linux et comment les contrôler dans un terminal.
<br class="ltx_break"></span><span class="ltx_text ltx_font_bold">Cette partie demande en particulier des précautions car elle consiste à modifier ses fichiers avec un contrôle <span class="ltx_text ltx_emph ltx_font_italic">root</span> et cela nest pas sans risques.
<br class="ltx_break">Il faut en particulier adapter les noms des partitions de ce guide à son propre système.
<br class="ltx_break"></span>Pour identifier ses disques, tapez (<span class="ltx_text ltx_emph ltx_font_italic">en root</span>) :</p>
<div class="ltx_listing ltx_lst_language_bash ltx_lstlisting ltx_listing" style="background-color:#BFBFBF;">
<div class="ltx_listing_data"><a href="data:text/plain;base64,On4jIGZkaXNrIC1s"></a></div>
<div id="lstnumberx110" class="ltx_listingline">
<span class="ltx_text ltx_font_typewriter" style="font-size:90%;">:~</span><span class="ltx_text ltx_lst_comment ltx_font_typewriter" style="font-size:90%;color:#1E843E;">#<span class="ltx_text ltx_lst_space"> </span>fdisk<span class="ltx_text ltx_lst_space"> </span>-l</span>
</div>
</div>
<p class="ltx_p">Vérifiez que vous navez aucun périphérique usb branché, éteignez et débranchez votre ordinateur, rallumez pour identifier votre disque source. Remettez hors tension, branchez le ou les disques externes, rallumez et identifiez les disques en root.
Si vous utilisez un seul disque externe vous devriez trouver :
<br class="ltx_break"><code class="ltx_verbatim ltx_font_typewriter">/dev/sda ### disque source</code>
<br class="ltx_break"><code class="ltx_verbatim ltx_font_typewriter">/dev/sdb ### disque des sauvegardes</code>
<br class="ltx_break"><span class="ltx_text ltx_font_smallcaps">Documentation :</span> <a href="https://wiki.debian-fr.xyz/Sauvegarder_sa_Debian_en_vue_d%27une_R%C3%A9installation_ou_Reconstruction_-_Racine_et_Home_s%C3%A9par%C3%A9s" title="" class="ltx_ref ltx_url ltx_font_typewriter">https://wiki.debian-fr.xyz/Sauvegarder_sa_Debian_en_vue_d%27une_R%C3%A9installation_ou_Reconstruction_-_Racine_et_Home_s%C3%A9par%C3%A9s</a></p>
</div>
</section>
</section>
<section id="SS4" class="ltx_subsection">
<h2 class="ltx_title ltx_title_subsection">
<span class="ltx_tag ltx_tag_subsection">6.4 </span>Copier des fichiers entre machines distantes via SSH</h2>
<div id="SS4.p1" class="ltx_para">
<p class="ltx_p">Syntaxe :
</p>
<div class="ltx_listing ltx_lst_language_bash ltx_lstlisting ltx_listing" style="background-color:#BFBFBF;">
<div class="ltx_listing_data"><a href="data:text/plain;base64,c2NwIHNvdXJjZSBkZXN0aW5hdGlvbg=="></a></div>
<div id="lstnumberx111" class="ltx_listingline">
<span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">scp</span><span class="ltx_text ltx_lst_space ltx_font_typewriter" style="font-size:90%;"> </span><span class="ltx_text ltx_lst_keyword ltx_font_typewriter" style="font-size:90%;color:#0000FF;">source</span><span class="ltx_text ltx_lst_space ltx_font_typewriter" style="font-size:90%;"> </span><span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">destination</span>
</div>
</div>
<p class="ltx_p">Pour copier un fichier de B à A en étant connecté sur B :</p>
<div class="ltx_listing ltx_lst_language_bash ltx_lstlisting ltx_listing" style="background-color:#BFBFBF;">
<div class="ltx_listing_data"><a href="data:text/plain;base64,c2NwIC9wYXRoL3RvL2ZpbGUgdXNlcm5hbWVAYTovcGF0aC90by9kZXN0aW5hdGlvbg=="></a></div>
<div id="lstnumberx112" class="ltx_listingline">
<span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">scp</span><span class="ltx_text ltx_lst_space ltx_font_typewriter" style="font-size:90%;"> </span><span class="ltx_text ltx_font_typewriter" style="font-size:90%;">/</span><span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">path</span><span class="ltx_text ltx_font_typewriter" style="font-size:90%;">/</span><span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">to</span><span class="ltx_text ltx_font_typewriter" style="font-size:90%;">/</span><span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">file</span><span class="ltx_text ltx_lst_space ltx_font_typewriter" style="font-size:90%;"> </span><span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">username@a</span><span class="ltx_text ltx_font_typewriter" style="font-size:90%;">:/</span><span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">path</span><span class="ltx_text ltx_font_typewriter" style="font-size:90%;">/</span><span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">to</span><span class="ltx_text ltx_font_typewriter" style="font-size:90%;">/</span><span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">destination</span>
</div>
</div>
<p class="ltx_p">Pour copier un fichier de B à A en étant connecté sur A :</p>
<div class="ltx_listing ltx_lst_language_bash ltx_lstlisting ltx_listing" style="background-color:#BFBFBF;">
<div class="ltx_listing_data"><a href="data:text/plain;base64,c2NwIHVzZXJuYW1lQGI6L3BhdGgvdG8vZmlsZSAvcGF0aC90by9kZXN0aW5hdGlvbg=="></a></div>
<div id="lstnumberx113" class="ltx_listingline">
<span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">scp</span><span class="ltx_text ltx_lst_space ltx_font_typewriter" style="font-size:90%;"> </span><span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">username@b</span><span class="ltx_text ltx_font_typewriter" style="font-size:90%;">:/</span><span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">path</span><span class="ltx_text ltx_font_typewriter" style="font-size:90%;">/</span><span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">to</span><span class="ltx_text ltx_font_typewriter" style="font-size:90%;">/</span><span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">file</span><span class="ltx_text ltx_lst_space ltx_font_typewriter" style="font-size:90%;"> </span><span class="ltx_text ltx_font_typewriter" style="font-size:90%;">/</span><span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">path</span><span class="ltx_text ltx_font_typewriter" style="font-size:90%;">/</span><span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">to</span><span class="ltx_text ltx_font_typewriter" style="font-size:90%;">/</span><span class="ltx_text ltx_lst_identifier ltx_font_typewriter" style="font-size:90%;">destination</span>
</div>
</div>
</div>
</section>
</section>
</div>
<footer class="ltx_page_footer">
<div>
<a href="S5.html" title="5 Yunohost, Brique Internet et autres serveur-like tips ‣ Compilation de commandes utiles régulièrement, ou pas" class="ltx_ref" rel="prev"><span class="ltx_text ltx_ref_title"><span class="ltx_tag ltx_tag_ref">5 </span>Yunohost, Brique Internet et autres serveur-like tips</span></a><a href="S7.html" title="7 Logiciels ‣ Compilation de commandes utiles régulièrement, ou pas" class="ltx_ref" rel="next"><span class="ltx_text ltx_ref_title"><span class="ltx_tag ltx_tag_ref">7 </span>Logiciels</span></a>
</div>
<div class="ltx_page_logo">Generated on Tue Nov 24 18:44:33 2020 by <a href="http://dlmf.nist.gov/LaTeXML/">LaTeXML <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAAOCAYAAAD5YeaVAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9wKExQZLWTEaOUAAAAddEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIFRoZSBHSU1Q72QlbgAAAdpJREFUKM9tkL+L2nAARz9fPZNCKFapUn8kyI0e4iRHSR1Kb8ng0lJw6FYHFwv2LwhOpcWxTjeUunYqOmqd6hEoRDhtDWdA8ApRYsSUCDHNt5ul13vz4w0vWCgUnnEc975arX6ORqN3VqtVZbfbTQC4uEHANM3jSqXymFI6yWazP2KxWAXAL9zCUa1Wy2tXVxheKA9YNoR8Pt+aTqe4FVVVvz05O6MBhqUIBGk8Hn8HAOVy+T+XLJfLS4ZhTiRJgqIoVBRFIoric47jPnmeB1mW/9rr9ZpSSn3Lsmir1fJZlqWlUonKsvwWwD8ymc/nXwVBeLjf7xEKhdBut9Hr9WgmkyGEkJwsy5eHG5vN5g0AKIoCAEgkEkin0wQAfN9/cXPdheu6P33fBwB4ngcAcByHJpPJl+fn54mD3Gg0NrquXxeLRQAAwzAYj8cwTZPwPH9/sVg8PXweDAauqqr2cDjEer1GJBLBZDJBs9mE4zjwfZ85lAGg2+06hmGgXq+j3+/DsixYlgVN03a9Xu8jgCNCyIegIAgx13Vfd7vdu+FweG8YRkjXdWy329+dTgeSJD3ieZ7RNO0VAXAPwDEAO5VKndi2fWrb9jWl9Esul6PZbDY9Go1OZ7PZ9z/lyuD3OozU2wAAAABJRU5ErkJggg==" alt="[LOGO]"></a>
</div></footer>
</div>
</body>
</html>