Автор Тема: Kакво представлява duplicity и как се инсталира  (Прочетена 3945 пъти)

ivo_18

  • Напреднали
  • *****
  • Публикации: 64
  • Distribution: Slackware 13.37
    • Профил
Здравейте,

Трябва да инсталирам duplicity в едно Убунту
Обаче, нещо не ми става ясно както точно представлява това duplicity и как се инсталира.

Потърсих в търсачката на форума като използвах key word - duplicity , но не ми излезе резултат.

Нека първо да започнем от там, какво е duplicity и за какво служи? Някой може ли да помогне?

Edit:

Цитат
Description
 Duplicity incrementally backs up files and directory by encrypting tar-format volumes with GnuPG and uploading them to a remote (or local) file server. Currently local, ftp, sftp/scp, rsync, WebDAV, WebDAVs, Google Docs, HSi and Amazon S3 backends are available. Because duplicity uses librsync, the incremental archives are space efficient and only record the parts of files that have changed since the last backup. Currently duplicity supports deleted files, full Unix permissions, directories, symbolic links, fifos, etc., but not hard links.

 If you are backing up the root directory /, remember to --exclude /proc, or else duplicity will probably crash on the weird stuff in there.

Ето какво намерих - https://help.ubuntu.com/community/DuplicityBackupHowto но все още не ми става ясно за какво става въпрос.

Следвам гайда но ми дава следната грешка, а именно.

Код:
root@redmine ~# apt-get install duplicity
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Couldn't find package duplicity

Код:
root@redmine ~# apt-get install ncftp
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package ncftp is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package ncftp has no installation candidate

До колкото разбирам, пакета с дуплисити липсва, затова го свалимх от http://packages.ubuntu.com/lucid/i386/duplicity/download 
ubuntu.linux-bg.org/ubuntu/ и сега ще пробвам да го инсталирам - duplicity_0.6.08b-0ubuntu2_i386.deb

Сложих въпросния файл duplicity_0.6.08b-0ubuntu2_i386.deb в /root и отновно изпълних:

Код:
root@redmine ~# apt-get install duplicity
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Couldn't find package duplicity

Отново ми дава същата грешка.
« Последна редакция: Apr 20, 2012, 14:14 от ivo_18 »
Активен

satir

  • Напреднали
  • *****
  • Публикации: 1073
  • Distribution: FreeBSD-10.1 & LMDE
  • Window Manager: i prefer MATE
    • Профил
    • WWW
това пише в синаптик за duplicity :
Код:
Duplicity backs directories by producing encrypted tar-format volumes
and uploading them to a remote or local file server. Because duplicity
uses librsync, the incremental archives are space efficient and only
record the parts of files that have changed since the last backup.
Because duplicity uses GnuPG to encrypt and/or sign these archives, they
will be safe from spying and/or modification by the server.
в моя случай пакета не липсва. провери си източниците на пакети..
Активен

ivo_18

  • Напреднали
  • *****
  • Публикации: 64
  • Distribution: Slackware 13.37
    • Профил
O.k. тенкс.

Ето какво направих преди малко:

От този линк - http://ubuntuforums.org/showthread.php?t=1058056 взех примера с:

Код:
apt-get update
 apt-get upgrade

Екзекютнах и двете команди и съответно ъпдейтнах и ъпгрейднах убунтуто.

След това се опитах да екзекютна следната команда:
Код:
apt-get install duplicity

И ето какво се получи:

Код:
root@redmine ~# apt-get install duplicity
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.
root@redmine ~# sudo dpkg --configure -a
-bash: sudo: command not found

Едит:

Е не е тръбвало да изпълнявам и sudo към командата, та ето след това какво стана:

Код:
root@redmine ~# dpkg --configure -a
Setting up libpq5 (8.4.11-0ubuntu0.10.04) ...

Setting up libfreetype6 (2.3.11-1ubuntu2.6) ...

Processing triggers for initramfs-tools ...
update-initramfs: Generating /boot/initrd.img-2.6.32-36-generic
.: 13: Can't open /scripts/casper-functions
.: 6: Can't open /scripts/casper-functions
.: 6: Can't open /scripts/casper-functions
Setting up libparted0debian1 (2.2-5ubuntu5.2) ...

Setting up turnkey-pylib (0.3+31+g3e22221) ...
Setting up openssl (0.9.8k-7ubuntu8.8) ...

Setting up grub-common (1.98-1ubuntu13) ...

Setting up bzr (2.1.4-0ubuntu1) ...
Installing new version of config file /etc/bash_completion.d/bzr.simple ...

Setting up libpq-dev (8.4.11-0ubuntu0.10.04) ...
Setting up uuid-runtime (2.17.2-0ubuntu1.10.04.2) ...

Setting up inithooks (0.9+12+g77acd9f) ...

Configuration file `/etc/default/inithooks'
 ==> Modified (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : background this process to examine the situation
 The default action is to keep your current version.
*** inithooks (Y/I/N/O/D/Z) [default=N] ? Y
Installing new version of config file /etc/default/inithooks ...
Installing new version of config file /etc/init.d/inithooks ...

Setting up ntp (1:4.2.4p8+dfsg-1ubuntu2.1) ...
 * Starting NTP server ntpd
   ...done.

Setting up acpid (1.0.10-5ubuntu2.5) ...
Installing new version of config file /etc/acpi/powerbtn.sh ...
start: Job is already running: acpid

Setting up apache2-utils (2.2.14-5ubuntu8.9) ...
Setting up ethtool (6+20091202-1ubuntu1) ...
Installing new version of config file /etc/network/if-pre-up.d/ethtool ...
Installing new version of config file /etc/network/if-up.d/ethtool ...
Setting up openssh-server (1:5.3p1-3ubuntu7) ...
ssh stop/waiting
ssh start/running, process 6927

Setting up pycurl-wrapper (1.0+7+g19d27bb) ...
Setting up grub-pc (1.98-1ubuntu13) ...
Package configuration


 lqqqqqqqqqqqqqqqqqqqqqqqqqqu Configuring grub-pc tqqqqqqqqqqqqqqqqqqqqqqqqqqk
 x A new version of configuration file /etc/default/grub is available, but   x
 x the version installed currently has been locally modified.                x
 x                                                                           x
 x What do you want to do about modified configuration file grub?            x
 x                                                                           x
 x        install the package maintainer's version                           x
 x        keep the local version currently installed                         x
 x        show the differences between the versions                          x
 x        show a side-by-side difference between the versions                x
 x        show a 3-way difference between available versions                 x
 x        do a 3-way merge between available versions (experimental)         x
 x        start a new shell to examine the situation                         x
 x                                                                           x
 x                                                                           x
 x                                  <Ok>                                     x
 x                                                                           x
 mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj


Replacing config file /etc/default/grub with new version                       
Installation finished. No error reported.
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.32-36-generic
Found initrd image: /boot/initrd.img-2.6.32-36-generic
done

Setting up confconsole (0.9.4+33+g9dbbc38) ...

Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
Setting up linux-firmware (1.34.7) ...
Setting up apache2.2-bin (2.2.14-5ubuntu8.9) ...
Setting up ssh (1:5.3p1-3ubuntu7) ...

Setting up tklbam (1.1+10+gc5e7f61) ...

Setting up hubdns (1.0+1+ge6613b7) ...

Setting up apache2.2-common (2.2.14-5ubuntu8.9) ...

Setting up apache2-prefork-dev (2.2.14-5ubuntu8.9) ...

Setting up apache2-mpm-prefork (2.2.14-5ubuntu8.9) ...
 * Starting web server apache2
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
httpd (pid 1148) already running
   ...done.

Setting up apache2 (2.2.14-5ubuntu8.9) ...

Setting up libstdc++6-4.4-dev (4.4.3-4ubuntu5.1) ...
Setting up g++-4.4 (4.4.3-4ubuntu5.1) ...
Processing triggers for python-central ...

И продължавам:

Код:
root@redmine ~# apt-get install duplicity
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  python-gnupginterface python-pexpect
Suggested packages:
  python-boto ncftp
The following NEW packages will be installed:
  duplicity python-gnupginterface python-pexpect
0 upgraded, 3 newly installed, 0 to remove and 2 not upgraded.
Need to get 376kB of archives.
After this operation, 1782kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://bg.archive.ubuntu.com/ubuntu/ lucid/main python-gnupginterface 0.3.2-9.1 [19.1kB]
Get:2 http://bg.archive.ubuntu.com/ubuntu/ lucid/main python-pexpect 2.3-1build1 [165kB]
Get:3 http://bg.archive.ubuntu.com/ubuntu/ lucid-updates/universe duplicity 0.6.08b-0ubuntu2.1 [192kB]
Fetched 376kB in 0s (1156kB/s)
[master f72fb6a] saving uncommitted changes in /etc prior to apt run
 36 files changed, 386 insertions(+), 98 deletions(-)
 create mode 100644 default/grub.ucf-old
 create mode 100755 update-motd.d/00-header
 create mode 100755 update-motd.d/10-help-text
 rewrite webmin/system-status/info (81%)
 delete mode 100644 webmin/system-status/info.lock
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously deselected package python-gnupginterface.
(Reading database ... 45168 files and directories currently installed.)
Unpacking python-gnupginterface (from .../python-gnupginterface_0.3.2-9.1_all.deb) ...
Selecting previously deselected package python-pexpect.
Unpacking python-pexpect (from .../python-pexpect_2.3-1build1_all.deb) ...
Selecting previously deselected package duplicity.
Unpacking duplicity (from .../duplicity_0.6.08b-0ubuntu2.1_i386.deb) ...
Processing triggers for man-db ...
Setting up python-gnupginterface (0.3.2-9.1) ...

Setting up python-pexpect (2.3-1build1) ...

Processing triggers for python-central ...
Setting up duplicity (0.6.08b-0ubuntu2.1) ...

Processing triggers for python-support ...
Processing triggers for python-central ...
Counting objects: 1408, done.
Compressing objects: 100% (1029/1029), done.
Writing objects: 100% (1408/1408), done.
Total 1408 (delta 105), reused 0 (delta 0)

Някакви идеи какво да правя по нататък?
« Последна редакция: Apr 19, 2012, 15:44 от ivo_18 »
Активен

Bagatur

  • Напреднали
  • *****
  • Публикации: 267
  • Distribution: Debian Squeeze
  • Window Manager: KDE Development Platform: 4.4.5 , LXDE
    • Профил
Странно!!! ??? Не знаеш за какво се използва, не знаеш как се инсталира, не знаеш как се работи но все пак напираш да го инсталираш.
Не виждам смисъла от цялата работа.
Сега остава да правиш бекъпи. Действай  >:D
Активен

Учим се докато сме живи....

ivo_18

  • Напреднали
  • *****
  • Публикации: 64
  • Distribution: Slackware 13.37
    • Профил
Ще цитирам подписа ти:

Цитат
Учим се докато сме живи....

Разбрах за какво е Duplicity, просто ми трябаше малко време да прочета.

https://help.ubuntu.com/community/DuplicityBackupHowto

http://wiki.kartbuilding.net/index.php/Duplicity_-_secure_incremental_backup
« Последна редакция: Apr 20, 2012, 12:31 от ivo_18 »
Активен

ivo_18

  • Напреднали
  • *****
  • Публикации: 64
  • Distribution: Slackware 13.37
    • Профил
Аз да попитам пак нещо.
Имам следния случай, имам файлове като например duplicity-full.20120412T085848Z.vol10.difftar.gpg които ми се намират в /home/ftp-docs/backups/redmine

Инсталирал съм Duplicity, наясно съм каква е функцията която изпълнява, но не мога да се справя с ресторването на файловете които имам в /home/ftp-docs/backups/redmine те са няколко като full.20120412T085848Z.vol10.difftar.gpg и нещо не мога да се оправя с рестора.
Какви са командите които трябва да се изпълнят за да възстановя файловете които имам и да мога да ги преглеждам?

http://www.kabatology.com/10/17/backup-and-restore-documents-with-duplicity/

Цитат
To restore the directory do

duplicity scp://root@backup.widatec.net
 //export/backup/home_www /home

With this command Duplicity recuperates from the remote archive the local /home directory

По горе цитираното от мен се опитвам да го разбера, но нещо не се получава.

Накой може ли да ми помогне?

Предварително благодаря.
« Последна редакция: Apr 20, 2012, 15:43 от ivo_18 »
Активен

laskov

  • Напреднали
  • *****
  • Публикации: 3166
    • Профил
Да но, ако се съди от името на файла, може да се окаже, че това не е пълен архив, а е следващ с архивирани разликите само.
Активен

Не си мислете, че понеже Вие мислите правилно, всички мислят като Вас! Затова, когато има избори, идете и гласувайте, за да не сте изненадани после от резултата, и за да не твърди всяка партия, че тя е спечелила, а Б.Б. (С.С., ...) е загубил, а трети да управлява.  Наздраве!  [_]3

ivo_18

  • Напреднали
  • *****
  • Публикации: 64
  • Distribution: Slackware 13.37
    • Профил
Да но, ако се съди от името на файла, може да се окаже, че това не е пълен архив, а е следващ с архивирани разликите само.

Да, файловете са 10, но ресторването чрез командите не ми е ясно.

Файловете които искам да ресторна идват от друга машина, същата като тази на която работя. Та, те идват и си седят в /home/ftp-docs/backups/redmine и чакат само да бъдат ресторнати на същата машина.
« Последна редакция: Apr 20, 2012, 15:55 от ivo_18 »
Активен

satir

  • Напреднали
  • *****
  • Публикации: 1073
  • Distribution: FreeBSD-10.1 & LMDE
  • Window Manager: i prefer MATE
    • Профил
    • WWW
отвори една конзола/терминал и изпълни: man duplicity
Активен

ivo_18

  • Напреднали
  • *****
  • Публикации: 64
  • Distribution: Slackware 13.37
    • Профил
отвори една конзола/терминал и изпълни: man duplicity

Да, това го направих.

Тук http://duplicity.nongnu.org/duplicity.1.html също има описано man на Duplicity.

Код:
root@redmine ~# duplicity collection-status file:///home/ftp-docs/backups/redmine
Synchronizing remote metadata to local cache...
GnuPG passphrase:
Copying duplicity-full-signatures.20120412T085848Z.sigtar to local cache.
GPGError: GPG Failed, see log below:
===== Begin GnuPG log =====
gpg: 3DES encrypted data
gpg: encrypted with 1 passphrase
gpg: decryption failed: bad key
===== End GnuPG log =====

 ???
« Последна редакция: Apr 20, 2012, 17:42 от ivo_18 »
Активен

dejuren

  • Напреднали
  • *****
  • Публикации: 1025
  • Distribution: Ubuntu, RedHat
  • Window Manager: lxde KDE4
    • Профил
Очите ти ще извади... хайде, специално за теб отрязах важното:
Код:
GnuPG passphrase:

GPGError: GPG Failed, see log below:
===== Begin GnuPG log =====
gpg: 3DES encrypted data
gpg: encrypted with 1 passphrase
gpg: decryption failed: bad key
===== End GnuPG log =====
Активен

http://webchat.freenode.net/?channels=ubuntu-bg
The quieter you become, the more you are able to hear.
Две седмици цъкане с мишката спестяват два часа четене на документацията.

ivo_18

  • Напреднали
  • *****
  • Публикации: 64
  • Distribution: Slackware 13.37
    • Профил
Активен

ivo_18

  • Напреднали
  • *****
  • Публикации: 64
  • Distribution: Slackware 13.37
    • Профил
Здравейте, изникна ми друг пролем който не мога да реша сам:

Цитат
root@redmine ~# duplicity restore --encrypt-key=mypasshere --file-to-restore=/home/ftp-docs/backups/redmine/ /tmp/restore
Command line error: Expected 2 args, got 1
Enter 'duplicity --help' for help screen.

Гледах в help page-a, но не мога да си локализирам грешката. Кой аргумент не съм добавил в командатата, че системата не може да я приеме?

Цитат
duplicity [restore] [options] source_url target_dir

restore <target_url> <source_dir>

 --encrypt-key=gpg-key-id

Ползвам duplicity 0.6.08b

Edit:
Kaто гледам аз съм оплескал нещо нещата би трябвало командата да е така:

Код:
root@redmine ~# duplicity restore restore --encrypt-key=123456 --file-to-restore=file:///home/ftp-docs/backups/ /tmp/restore

Но след като я екзекютна ми излиза следното:

Цитат
Command line error: One of the arguments must be an URL.  Examples of URL strings are
"scp://user@host.net:1234/path" and "file:///usr/local".  See the man
page for more information.
Enter 'duplicity --help' for help screen.

 ???
« Последна редакция: Apr 23, 2012, 14:10 от ivo_18 »
Активен