-->
Home » » DIBS is a backup system that protects your data by giving your files to peers.

DIBS is a backup system that protects your data by giving your files to peers.

http://swik.net/swikIcons/img-394-96x96.pngDIBS is a backup system that protects your data by giving your files to peers (and in return, you store their files) so that if a catastrophe strikes your area, you can recover data from surviving peers.

This solves the problem of mirroring your data by adding more disks to your own computer only ot have a fire, flood, power surge, etc. wiping out your local data center.

Note that DIBS is a backup system, *not* a file sharing system like Napster, Gnutella, Kazaa, etc. In fact, DIBS encrypts all data transmissions so that the peers you trade files with can not access your data.


Latest File Releases
The latest file releases
Package Release Date Notes / Monitor Downloads

dibs dibs version 0.93 April 13, 2006 Release notes - Monitor this package Download
Since disk drives are cheap, backup should be cheap too. Of course it does not help to mirror your data by adding more disks to your own computer because a virus, fire, flood, power surge, robbery, etc. could still wipe out your local data center. Instead, you should give your files to peers (and in return store their files) so that if a catastrophe strikes your area, you can recover data from surviving peers. The Distributed Internet Backup System (DIBS) is designed to implement this vision.
Note that DIBS is a backup system not a file sharing system like Napster, Gnutella, Kazaa, etc. In fact, DIBS encrypts all data transmissions so that the peers you exchange files with can not access your data.

1.1 Features

1.1.1 Automated Backup

After initial configuration, DIBS is designed to run in the background and automatically backup desired data. Specifically, any files, directories, or links placed in the DIBS auto backup directory (usually ~/.dibs/autoBackup) are periodically examined by DIBS and sent to peers for backup. If the data changes, DIBS automatically unstores old versions and backs up changes.

1.1.2 Incremental Backup

DIBS performs incremental backup. Specifically, if DIBS is asked to backup a file (either automatically or by the user), and DIBS determines the file is already backed up and the file is unchanged, DIBS does not re-backup the file. This allows you to efficiently backup large numbers of files without wasting bandwidth by repeatedly backing up unchanged data.

1.1.3 Security

DIBS uses Gnu Privacy Guard (GPG) to encrypt and digitally sign all transactions. Thus you can be confident that even though you are sending your files to others for backup, your data will remain private. Furthermore, by using digital signatures, DIBS prevents others from impersonating you to store files with your peers.

1.1.4 Robustness

DIBS uses Reed-Solomon codes (a type of erasure correcting code similar to those used in RAID systems) to gain the maximum robustness for a given amount of redundancy. See the FAQ for a description of the benefits of Reed-Solomon codes.

1.1.5 Peer Finder Service

DIBS includes a peer finder service to allow you to find peers to exchange backup space with.

1.1.6 Flexible Communication Modes

Since peers can have varying levels of connectivity to the network, DIBS offers different communication methods to support a variety of users.
  • active: In active mode, the sender directly connects to another peer over the network to transfer files and messages. This is the preferred mode for peers who are almost always directly connected to the network.
  • passive: In passive mode, the sender stores messages in a local queue and delivers them to the receiver whenever the receiver initiates a connection. This mode is required when the receiver is behind a firewall (and can not be contacted directly) or is not always connected to the network. 
2 Installing 
2.1 Prerequisites 
 For DIBS to work, you need to have the following installed:
  • Python version 2.2 or greater.
  • Gnu Privacy Guard (GPG) version 1.2 or greater.
  • If you want to compile the documentation, you will need LaTeX and texinfo installed.
  • For Debian users the packages gnupg, python2.2, python2.2-dev, texinfo, and tetex-bin should be enough.
  • If you are using Windows, you should also install the Python windows extensions from http://www.python.org/windows/win32com.

2.2 Installation
To install DIBS, download the binary distribution for you architecture or the entire source tarball from http://dibs.sourceforge.net or http://www.csua.berkeley.edu/~emin/source_code/dibs. If you download the source tarball, uncompress it, become root, and do python setup.py install to install. If you do not want to install as root, you can do python setup.py install --root=//.
The main file used to run DIBS is dibs.py which will usually be installed in an appropriate place for Python scripts. On a UNIX system, you should be able to run DIBS using dibs.py .... On a Windows system, you may need to do something like C:\\\python.exe dibs.py ....

2.3 Configuration

2.3.1 Create a GPG key

Create a GPG key for DIBS using the command gpg --gen-key. You MUST use an empty passphrase for your key so that DIBS can sign/encrypt with it in batch mode. We recommend choosing the "email address" field of the key to be different from your true email address by appending .dibs (e.g. emin.dibs@alum.mit.edu). Make sure you give your gpg public key to any peers you want to trade files with. If your GPG key is not $USER@$HOST, you will need to put the commands dibsPublicKey = '' and dibsPrivateKey = '' in your dibsrc.py file. See the section in the manual on Options for more details.
2.3.1.1 IMPORTANT: DIBS refers to keys by email address

DIBS currently refers to GPG keys via the email address as opposed to the GPG key fingerprint or other method. Thus when you set dibsPublicKey, dibsPrivateKey, etc., you should be doing something like
dibsPrivateKey = 'emin.dibs@alum.mit.edu'
Also, you do not need to put a real email address in the name of the key, you can essentially put in whatever name you like. Thus if you have multiple machines running dibs you can have one machine with the key name foo.dibs@example.com and another with the key bar.dibs@example.com and so on.

2.3.2 Create An Empty Database

Issue the command dibs.py show_database
Normally, this command would show you the database of peers you can exchange files with (which should be empty). Since this is the first time you are using DIBS, this command (actually any command) will first create the ~/.dibs directory to hold DIBS related files. On a windows system ~/ usually refers to C:\Documents and Settings\.

2.3.3 Customize Default Parameters

If your email address is not $USER@$HOST and/or your GPG key is not $USER.dibs@HOST you will need to tell DIBS about this in the file ~/.dibs/dibsrc.py. In that file put the following:
dibsPublicKey = ''
     dibsPrivateKey = ''
     dibsAdmin = ''
Remember to refer to GPG keys by the email address as described in GPG Keys Named via Email Address.
Also, if your gpg program is in a weird place, you may also want to put
gpgProg = '//gpg'
If your python executable is in a strange place (e.g., if you run Windows) or if you have more than one version of python installed (e.g., on a Debian or OS X system where you installed a different version in addition to the default python installation), you may also need to specify the location of the python interpreter via
pythonExe = '//python'
Finally, you will probably need to set your outgoing mail server via something like
smtpServer = 'smtp..com'
See the manual for other customizations that can go in the dibsrc.py file.

2.3.4 Add Peers

Their are two basic ways to tell DIBS about people or computers with whom you want to exchange backup space. You can either find partners yourself and manually import their GPG key and manually enter their information using the add_peer command are you can use the DIBS peer finder service with the post_contract and propose_contract commands. Ideally, the peer finder service should be simpler and easier, but it is currently somewhat experimental. Both methods are discussed below.
2.3.4.1 Using the add_peer Command
First, you must import the GPG keys you from people you want to exchange files with. This can be done using gpg --import. See the GPG documentation for more details. As described in GPG Keys Named via Email Address, DIBS currently uses the email address for a GPG key as the peer name, so when you create a GPG key it is useful to keep this in mind. Please read the description below before creating/importing GPG keys for use with DIBS.
Once you agree to trade files with someone, each of you must add the other to the DIBS database using the following command:
dibs.py add_peer --email TRUE_EMAIL_ADDRESS
      --peer DIBS_KEY_FOR_PEER --local_quota L_QUOTA
      --remote_quota R_QUOTA --comment COMMENT
      --talk TALK_METHOD --listen LISTEN_METHOD
      --host HOST --port PORT
The arguments have the following meaning:
TRUE_EMAIL_ADDRESS:
The true email address of the peer. This is where DIBS sends correspondence to.
GPG_KEY_FOR_PEER:
The name of the peer's DIBS key. Specifically, this must be the email address for the GPG key not other methods of key identification and not the true email address for the peer.
L_QUOTA:
This is how much space (in kilo-bytes) you will allow the peer to use on your machine.
R_QUOTA:
This is how much space (in kilo-bytes) your peer will allow you to use on his machine.
COMMENT:
A required comment (this can be "none" if you like).
TALK_METHOD:
How to send messages to this peer. This can be either active, passive. We recommend using active, but passive will be required if you or your peer is behind a firewall. See the manual for details.
LISTEN_METHOD:
How to receive messages from this peer. This can be either active, passive. We recommend using active, but passive will be required if you or your peer is behind a firewall. Essentially, the listen method you use is the talk method a corresponding peer would use and vice versa.
HOST:
The name of the machine which peer operates from.
PORT:
The port on HOST to use. This is an optional parameter with default specified in the dibs_options.py or dibsrc.py file.
For example, if you wanted to trade files with me where I store 1 MB for you and you store 5 MB for me you would issue the command
dibs.py add_peer --email emin@alum.mit.edu --peer emin.dibs@alum.mit.edu --local_quota 5000 --remote_quota 1000 --comment "trade with emin" --talk active --listen active --host martinian.com
There should be no line breaks in the command above. Notice that my email address is emin@alum.mit.edu, but my dibs key is emin.dibs@alum.mit.edu, and the machine I plan to run dibs on is martinian.com.
This will create an entry for the peer in the database (you can verify this using the command dibs show_database).
2.3.4.2 Using the post_contract and propose_contract Commands
An alternative to manually finding a peer and adding the required information is to use the new post_contract and propose_contract commands introduced in version 1.0 of DIBS. Essentially, the post_contract command allows you to post an advertisement on the Internet (or alternatively a private intranet) describing the trade parameters you want. Someone else can then use the propose_contract command to answer your advertisement. If the proposed parameters match your advertisement then your DIBS client and your partner's client will automatically exchange the proper information such as GPG keys, talk and listen modes, etc.
These functions are still experimental, however, and so they are described in Peer Finder instead of the install section for now. Users are encouraged to try them out, but those who just want to get DIBS working and do not want to fiddle with things may prefer the better tested but more tedious add_peer approach.

2.3.5 Automated Backup

To have DIBS automatically back up files or directories, put the desired files or directories (or better yet, links to them in ~/.dibs/autoBackup). For example, if you have a UNIX system and want to have your .emacs file and your Mail directory automatically backed up you could do
cd ~/.dibs/autoBackup
     ln -s ~/Mail
     ln -s ~/.emacs
Once you start the DIBS daemon (described below), it will periodically check everything in ~/.dibs/autoBackup for changes and back them up.

2.3.6 Running DIBS

For DIBS to work, you must start the daemon with the command
dibs.py start_daemon
I recommend starting the daemon inside a screen session if you have the screen program installed so that you can view the messages the daemon generates. If you are going to start DIBS in a terminal or console that you plan to close and you have a UNIX system, you should instead do
nohup dibs.py start_daemon > /dev/null &
so that DIBS does not die when trying to write to standard out.
If errors occur, you may need to restart the daemon. the DIBS daemon will periodically send them out to peers to be backed up.

2.3.7 Preparing for Complete Data Loss

Finally, in order to recover from complete data loss you need to protect two absolutely critical pieces of information: your GPG key and the list of peers you trade with. You can obtain the former by exporting it from GPG and the latter from your ~/.dibs/dibs_database.peerDatabase file. So put these two pieces of information onto a floppy, CD, or good old fashioned paper and store them in a safe place (see the section on Recovering Everything for more details).
If you do not store these pieces of information you will still be able to recover from isolated damage which does not affect this critical data.

    Adserver 
                    610x250

    If you liked this article, subscribe to the feed by clicking the image below to keep informed about new contents of the blog:

    0 commenti:

    Post a Comment

    Random Posts

    Recent Posts

    Recent Posts Widget

    Popular Posts

    Labels

    Archive

    page counter follow us in feedly
     
    Copyright © 2014 Linuxlandit & The Conqueror Penguin
    -->