文件操作 - restore-worst-case.page
返回文件管理
返回主菜单
删除本文件
文件: /usr/share/help/vi/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="vi"> <info> <desc>Làm gì nếu bạn không thể phục hồi các tập tin</desc> <link type="guide" xref="index#restore"/> </info> <title>Khi mọi thứ trở nên xấu đi</title> <p><app>Déjà Dup</app> có thể đã gặp lỗi. Có lẽ nó bị ngắt hoặc báo lỗi đến bạn khi bạn cố gắng để phục hồi. Khi bạn cần lấy lại dữ liệu, bạn phải giải quyết lỗi phát sinh. Hãy xem qua <link href="https://launchpad.net/deja-dup/+filebug">báo cáo lỗi</link>, trong thời gian chờ đợi, đây là một số cách tiếp cận cách giải quyết các vấn đề trục trặc của <app>Déjà Dup</app> và cứu lại dữ liệu của bạn.</p> <note><p>Hỗ trợ kĩ thuật cho bạn. Nếu bạn vẫn còn thắc mắc, đừng ngần ngại <link xref="support">đặt câu hỏi</link>.</p></note> <steps> <item><p>Mở <app>Cửa sổ dòng lệnh</app> bằng cách nhấn giữ các phím <keyseq><key>Ctrl</key><key>Alt</key><key>T</key></keyseq>.</p></item> <item><p>Tạo thư mục chứa các tập tin được phục hồi. Hướng dẫn này sẽ sử dụng thư mục <file its:translate="no">/tmp/restore</file>:</p> <screen its:translate="no">mkdir -p /tmp/restore</screen></item> </steps> <section id="duplicity"> <title>Phục hồi với Duplicity</title> <p>Trường hợp <app>Déjà Dup</app> không hoạt động, bạn sẽ dùng công cụ dòng lệnh <app>duplicity</app> vốn được <app>Déjà Dup</app> sử dụng để sao lưu và phục hồi tập tin.</p> <note style="advanced"><p>Nếu bạn muốn biết thêm nữa về <app>duplicity</app>, chạy lệnh <cmd>man duplicity</cmd>.</p></note> <p>Việc đầu tiên chúng ta thử đơn giản chỉ là phục hồi tất cả dữ liệu của bạn. Nếu các tập tin nằm trên ổ đĩa gắn ngoài được gắn kết vào <file its:translate="no">/media/backup</file> và bạn chọn mã hóa bản sao lưu, hãy thử:</p> <screen its:translate="no">duplicity --gio file:///media/backup /tmp/restore</screen> <p>Nếu bạn không mã hóa bản sao lưu, thêm <cmd its:translate="no">--no-encryption</cmd> vào lệnh.</p> <section id="locations"> <title>Vị trí lưu bản sao lưu khác</title> <p>Nếu bạn sao lưu sang một địa chỉ từ xa hoặc dịch vụ đám mây, thì cú pháp dùng trong <app>duplicity</app> sẽ khác với ổ đĩa gắn ngoài ở ví dụ trên. Xem mục bên dưới để biết cách kết nối đến vị trí lưu bản sao lưu bạn đã chọn.</p> <note><p>Nhớ thêm <cmd its:translate="no">--no-encryption</cmd> vào bất kì lệnh ví dụ nào nếu bản sao lưu chưa được mã hóa.</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>You may have specified a folder in which to put the backup files. In the example below, replace any instance of <var>FOLDER</var> with that path.</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">THƯ MỤC</var> /tmp/restore</screen> </item> <item> <title>Rackspace Cloud Files</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">TÊN NGƯỜI DÙNG</var> export CLOUDFILES_APIKEY=<var its:translate="yes">KHÓA</var> duplicity cf+http://<var its:translate="yes">CONTAINER</var> /tmp/restore</screen> </item> <item> <title>FTP</title> <p>Tra cứu địa chỉ máy chủ, cổng, tên người dùng, và mật khẩu để thay thế vào các mục tương ứng <var>MÁY CHỦ</var>, <var>CỔNG</var>, <var>TÊN NGƯỜI DÙNG</var>, và <var>MẬT KHẨU</var> trong ví dụ bên dưới.</p> <p>You may have specified a folder in which to put the backup files. In the example below, replace any instance of <var>FOLDER</var> with that path.</p> <p>Nếu bạn chọn đăng nhập không dùng tên người dùng, giá trị <var>TÊN NGƯỜI DÙNG</var> là <var its:translate="no">anonymous</var>.</p> <screen its:translate="no"> gvfs-mount ftp://<var its:translate="yes">TÊN NGƯỜI DÙNG</var>@<var its:translate="yes">MÁY CHỦ</var>:<var its:translate="yes">CỔNG</var>/<var its:translate="yes">THƯ MỤC</var> duplicity --gio ftp://<var its:translate="yes">TÊN NGƯỜI DÙNG</var>@<var its:translate="yes">MÁY CHỦ</var>:<var its:translate="yes">CỔNG</var>/<var its:translate="yes">THƯ MỤC</var> /tmp/restore</screen> </item> <item> <title>SSH</title> <p>Tra cứu địa chỉ máy chủ, cổng, tên người dùng, và mật khẩu để thay thế vào các mục tương ứng <var>MÁY CHỦ</var>, <var>CỔNG</var>, <var>TÊN NGƯỜI DÙNG</var>, và <var>MẬT KHẨU</var> trong ví dụ bên dưới.</p> <p>You may have specified a folder in which to put the backup files. In the example below, replace any instance of <var>FOLDER</var> with that path.</p> <screen its:translate="no"> gvfs-mount ssh://<var its:translate="yes">TÊN NGƯỜI DÙNG</var>@<var its:translate="yes">MÁY CHỦ</var>:<var its:translate="yes">CỔNG</var>/<var its:translate="yes">THƯ MỤC</var> duplicity --gio ssh://<var its:translate="yes">TÊN NGƯỜI DÙNG</var>@<var its:translate="yes">MÁY CHỦ</var>:<var its:translate="yes">CỔNG</var>/<var its:translate="yes">THƯ MỤC</var> /tmp/restore</screen> </item> <item> <title>WebDAV</title> <p>Tra cứu địa chỉ máy chủ, cổng, tên người dùng, và mật khẩu để thay thế vào các mục tương ứng <var>MÁY CHỦ</var>, <var>CỔNG</var>, <var>TÊN NGƯỜI DÙNG</var>, và <var>MẬT KHẨU</var> trong ví dụ bên dưới.</p> <p>You may have specified a folder in which to put the backup files. In the example below, replace any instance of <var>FOLDER</var> with that path.</p> <p>Nếu bạn muốn sử dụng kết nối an toàn (HTTPS) khi sao lưu, thay thế <var its:translate="no">dav://</var> bằng <var its:translate="no">davs://</var> trong ví dụ bên dưới.</p> <screen its:translate="no"> gvfs-mount dav://<var its:translate="yes">TÊN NGƯỜI DÙNG</var>@<var its:translate="yes">MÁY CHỦ</var>:<var its:translate="yes">CỔNG</var>/<var its:translate="yes">THƯ MỤC</var> duplicity --gio dav://<var its:translate="yes">TÊN NGƯỜI DÙNG</var>@<var its:translate="yes">MÁY CHỦ</var>:<var its:translate="yes">CỔNG</var>/<var its:translate="yes">THƯ MỤC</var> /tmp/restore</screen> </item> <item> <title>Windows Share</title> <p>Tra cứu địa chỉ máy chủ, tên người dùng, và mật khẩu để thay thế vào các mục tương ứng <var>MÁY CHỦ</var>, <var>TÊN NGƯỜI DÙNG</var>, và <var>MẬT KHẨU</var> trong ví dụ bên dưới.</p> <p>You may have specified a folder in which to put the backup files. In the example below, replace any instance of <var>FOLDER</var> with that path.</p> <p>Nếu bạn chỉ định một tên miền cho dịch vụ Windows, thêm nó vào phía trước <var>TÊN NGƯỜI DÙNG</var> và ngăn cách chúng bằng dấu chấm phẩy. Ví dụ, <var>tên_miền;tên_người_dùng</var>.</p> <screen its:translate="no"> gvfs-mount smb://<var its:translate="yes">TÊN NGƯỜI DÙNG</var>@<var its:translate="yes">MÁY CHỦ</var>/<var its:translate="yes">THƯ MỤC</var> duplicity --gio smb://<var its:translate="yes">TÊN NGƯỜI DÙNG</var>@<var its:translate="yes">MÁY CHỦ</var>/<var its:translate="yes">THƯ MỤC</var> /tmp/restore</screen> </item> </terms> </section> </section> <section id="by-hand"> <title>Phục hồi thủ công</title> <p>Thậm chí <app>duplicity</app> không hoạt động, hy vọng vẫn còn dù là nhỏ nhoi. Tập tin sao lưu khá phức tạp và không dễ đọc được. Nhưng nếu bạn đang tuyệt vọng, nó đáng để thử.</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>If you encrypted your backup, first you must decrypt the volume with <cmd its:translate="no">gpg</cmd>. Say you have <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>Or to do all at once (make sure you have plenty of space!):</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>Or again, to do all at once:</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>To recover data from incremental backups, use <cmd its:translate="no">rdiff</cmd> to stitch the files together. See <cmd its:translate="no">man rdiff</cmd> for usage.</p> </section> </page>
修改文件时间
将文件时间修改为当前时间的前一年
删除文件