文件操作 - restore-worst-case.page
返回文件管理
返回主菜单
删除本文件
文件: /usr/share/help/bs/deja-dup/restore-worst-case.page
编辑文件内容
<?xml version="1.0" encoding="utf-8"?> <page xmlns="http://projectmallard.org/1.0/" xmlns:its="http://www.w3.org/2005/11/its" its:version="1.0" type="topic" style="task" id="restore-worst-case" xml:lang="bs"> <info> <desc>Šta uraditi ako ne možete vratiti svoje datoteke.</desc> <link type="guide" xref="index#restore"/> </info> <title>Ako sve ode po zlu</title> <p><app>Déjà Dup</app> may fail. Maybe it crashes or gives you an error when you try to restore. When you really need your data back, the last thing you want do deal with is a bug. Consider filing a <link href="https://launchpad.net/deja-dup/+filebug">bug report</link> but in the meantime, here are some approaches to workaround a misbehaving <app>Déjà Dup</app> and get your data back.</p> <note><p>Ovo će nastaviti sa malo tehničkih terminologija. Ako ništa od ovoga ne razumijete, nemojte se bjati <link xref="support">tražiti pomoć</link>.</p></note> <steps> <item><p>Ovorite <app>Terminal</app> prozor pritiskom <keyseq><key>Ctrl</key><key>Alt</key><key>T</key></keyseq>.</p></item> <item><p>Kreirajte direktorij u kojem će se vratiti datoteke. Ovaj vodić će koristiti <file its:translate="no">/tmp/restore</file>:</p> <screen its:translate="no">mkdir -p /tmp/restore</screen></item> </steps> <section id="duplicity"> <title>Povrat sa Duplikacijom</title> <p>On the assumption that <app>Déjà Dup</app> is just not working for you right now, you’re going to use the command line tool <app>duplicity</app> that is used by <app>Déjà Dup</app> behind the scenes to back up and restore your files.</p> <note style="advanced"><p>Ako želite više informacija o <app>duplicity</app> nego što je prezentirano ovdje, pokrenite komandu <cmd>man duplicity</cmd>.</p></note> <p>The first thing we’ll try is a simple restore of all your data. Assuming your files are on an external drive mounted as <file its:translate="no">/media/backup</file> and you chose to encrypt the backup, try this:</p> <screen its:translate="no">duplicity --gio file:///media/backup /tmp/restore</screen> <p>Ako niste kodirali svoju rezervnu kopiju, dodajte <cmd its:translate="no">--no-encryption</cmd> komandi.</p> <section id="locations"> <title>Druge lokacije rezervnih kopija</title> <p>If you backed up to a remote or cloud server, the syntax you use with <app>duplicity</app> will be different than the external drive example above. See below for how to connect to your chosen backup location.</p> <note><p>Sjetite se dodati <cmd its:translate="no">--no-encryption</cmd> za bilo koje od primijera komandi ako vaša sigurnosna kopija nije kodirana.</p></note> <p>If <app>duplicity</app> appears to be having trouble connecting to your server, try downloading all the <app>duplicity</app> files yourself to a local folder and following the simpler example above.</p> <terms> <item> <title>Amazon S3</title> <p>Look up your Amazon S3 access key ID and secret access key and replace instances of <var>ID</var> and <var>SECRET</var> in the example below with those respective values.</p> <p>Možda ste specifirali folder u kojem treba postaviti sigurnosne kopije. U primjeru ispod, zamjenite bilo koju riječ <var>FOLDER</var> sa putanjom vaše lokacije.</p> <screen its:translate="no"> export AWS_ACCESS_KEY_ID=<var its:translate="yes">ID</var> export AWS_SECRET_ACCESS_KEY=<var its:translate="yes">SECRET</var> duplicity s3+http://deja-dup-auto-<var its:translate="yes">LOWERCASE_ID</var>/<var its:translate="yes">FOLDER</var> /tmp/restore</screen> </item> <item> <title>Rackspace Cloud datoteke</title> <p>Look up your Rackspace username and API key and replace instances of <var>USERNAME</var> and <var>KEY</var> in the example below with those respective values.</p> <p>You may have specified a container in which to put the backup files. In the example below, replace any instance of <var>CONTAINER</var> with that name.</p> <screen its:translate="no"> export CLOUDFILES_USERNAME=<var its:translate="yes">KORISNIČKO-IME</var> export CLOUDFILES_APIKEY=<var its:translate="yes">KLJUČ</var> duplicity cf+http://<var its:translate="yes">SADRŽILAC</var> /tmp/restore</screen> </item> <item> <title>FTP</title> <p>Look up your server address, port, username, and password and replace instances of <var>SERVER</var>, <var>PORT</var>, <var>USERNAME</var>, and <var>PASSWORD</var> in the example below with those respective values.</p> <p>Možda ste specifirali folder u kojem treba postaviti sigurnosne kopije. U primjeru ispod, zamjenite bilo koju riječ <var>FOLDER</var> sa putanjom vaše lokacije.</p> <p>Ako ne želite se logirati sa korisničkim imenom, iskoristite <var its:translate="no">anonymous</var> za vaše <var>KORISNIČKO IME</var> ispod.</p> <screen its:translate="no"> gvfs-mount ftp://<var its:translate="yes">KORISNIČKO-IME</var>@<var its:translate="yes">SERVER</var>:<var its:translate="yes">PORT</var>/<var its:translate="yes">FOLDER</var> duplicity --gio ftp://<var its:translate="yes">KORISNIČKO-IME</var>@<var its:translate="yes">SERVER</var>:<var its:translate="yes">PORT</var>/<var its:translate="yes">FOLDER</var> /tmp/restore</screen> </item> <item> <title>SSH</title> <p>Look up your server address, port, username, and password and replace instances of <var>SERVER</var>, <var>PORT</var>, <var>USERNAME</var>, and <var>PASSWORD</var> in the example below with those respective values.</p> <p>Možda ste specifirali folder u kojem treba postaviti sigurnosne kopije. U primjeru ispod, zamjenite bilo koju riječ <var>FOLDER</var> sa putanjom vaše lokacije.</p> <screen its:translate="no"> gvfs-mount ssh://<var its:translate="yes">KORISNIČKO-IME</var>@<var its:translate="yes">SERVER</var>:<var its:translate="yes">PORT</var>/<var its:translate="yes">FOLDER</var> duplicity --gio ssh://<var its:translate="yes">KORISNIČKO-IME</var>@<var its:translate="yes">SERVER</var>:<var its:translate="yes">PORT</var>/<var its:translate="yes">FOLDER</var> /tmp/restore</screen> </item> <item> <title>WebDAV</title> <p>Look up your server address, port, username, and password and replace instances of <var>SERVER</var>, <var>PORT</var>, <var>USERNAME</var>, and <var>PASSWORD</var> in the example below with those respective values.</p> <p>Možda ste specifirali folder u kojem treba postaviti sigurnosne kopije. U primjeru ispod, zamjenite bilo koju riječ <var>FOLDER</var> sa putanjom vaše lokacije.</p> <p>Ako odaberite sigurnusnu konekciju (HTTPS) dok kreirate sigurnusnu kopiju, koristite <var its:translate="no">davs://</var> umjesto <var its:translate="no">dav://</var> u primjeru ispod.</p> <screen its:translate="no"> gvfs-mount dav://<var its:translate="yes">KORISNIČKO-IME</var>@<var its:translate="yes">SERVER</var>:<var its:translate="yes">PORT</var>/<var its:translate="yes">FOLDER</var> duplicity --gio dav://<var its:translate="yes">KORISNIČKO-IME</var>@<var its:translate="yes">SERVER</var>:<var its:translate="yes">PORT</var>/<var its:translate="yes">FOLDER</var> /tmp/restore</screen> </item> <item> <title>Windows razmjena</title> <p>Look up your server address, username, and password and replace instances of <var>SERVER</var>, <var>USERNAME</var>, and <var>PASSWORD</var> in the example below with those respective values.</p> <p>Možda ste specifirali folder u kojem treba postaviti sigurnosne kopije. U primjeru ispod, zamjenite bilo koju riječ <var>FOLDER</var> sa putanjom vaše lokacije.</p> <p>Ako ste specificirali domenu vašem Windows serveru, dodajte je na ispred <var>KORISNIČKO IME</var> sa tačka-zerzom izmedju. Na primijer, <var>domna;korisničko ime</var>.</p> <screen its:translate="no"> gvfs-mount smb://<var its:translate="yes">KORISNIČKO-IME</var>@<var its:translate="yes">SERVER</var>/<var its:translate="yes">FOLDER</var> duplicity --gio smb://<var its:translate="yes">KORISNIČKO-IME</var>@<var its:translate="yes">SERVER</var>/<var its:translate="yes">FOLDER</var> /tmp/restore</screen> </item> </terms> </section> </section> <section id="by-hand"> <title>Ručno vračanje</title> <p>If even <app>duplicity</app> isn’t working for you, there may be little hope. The backup file format is complicated and not easily manipulated. But if you’re desperate, it’s worth a try.</p> <p>If you used a remote or cloud server to store your backup, first download all the <app>duplicity</app> files and place them in a folder on your computer. Then enter that folder in your terminal.</p> <p><app>Duplicity</app> stores your data in small chunks called volumes. Some volumes belong to the periodic ‘full’ or fresh backups and others to the ‘inc’ or incremental backups. Starting with a full backup set of volumes at volume 1, you’ll need to restore files volume by volume.</p> <p>Ako kodirate vaše sigurnosne kopije, prvo morate dekodirati medij sa <cmd its:translate="no">gpg</cmd>. Recimo imate datoteku <file its:translate="no">duplicity-full.20110127T131352Z.vol1.difftar.gpg</file>:</p> <screen its:translate="no">gpg --output duplicity-full.20110127T131352Z.vol1.difftar --decrypt duplicity-full.20110127T131352Z.vol1.difftar.gpg</screen> <p>Ili uraditi sve odjednim (provjerite da imate dovoljno prostora!):</p> <screen its:translate="no">gpg --multifile --decrypt duplicity-full.20110127T131352Z.*.difftar.gpg</screen> <p>Now you have either a <file its:translate="no">.difftar</file> or a <file its:translate="no">.difftar.gz</file> volume (depending on whether you had to decrypt it or not). Use <cmd its:translate="no">tar</cmd> on whichever one you have to extract the individual patch files:</p> <screen its:translate="no">tar xf duplicity-full.20110127T131352Z.vol1.difftar</screen> <p>Ili ponovo, uraditi sve odjednom:</p> <screen its:translate="no">for t in duplicity-full.20110127T131352Z.*.difftar; do tar xf $t; done</screen> <p>Now the patch files will be in <file its:translate="no">multivolume_snapshot</file> and <file its:translate="no">snapshot</file> folders. Each file that spanned multiple volumes will be in <file its:translate="no">multivolume_snapshot</file>. Let’s say you backed up <file its:translate="no">/home/jane/essay.txt</file>:</p> <screen its:translate="no">cd multivolume_snapshot/home/jane/essay.txt cat * > essay.txt</screen> <p>Za povrat datoteka iz inkrementalnih sigurnisnih kopija, koristite <cmd its:translate="no">rdiff</cmd> da zalijepite dijelove zajedno. pogledajte <cmd its:translate="no">man rdiff</cmd> za korištenje.</p> </section> </page>
修改文件时间
将文件时间修改为当前时间的前一年
删除文件