index.rst 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. Welcome to Darc's documentation!
  2. ================================
  3. Darc is a Deduplicating ARChiver written in Python.
  4. The main goal of Darc is to provide an efficient and secure way to backup data.
  5. Features
  6. --------
  7. Space efficient storage
  8. Variable block size `deduplication <http://en.wikipedia.org/wiki/Data_deduplication>`_
  9. is used to reduce the number of bytes stored by detecting redundant data.
  10. Each file is split into a number of variable length chunks and only chunks
  11. that have never been seen before are added to the store.
  12. Secure
  13. All data is encrypted using `AES256 <http://en.wikipedia.org/wiki/Advanced_Encryption_Standard>`_
  14. and the data integrity and authenticity is verified using
  15. `HMAC-SHA256 <http://en.wikipedia.org/wiki/HMAC>`_.
  16. Remote stores
  17. Darc can store data on remote hosts over SSH as long as Darc is installed on
  18. the remote host. The following syntax is used to specify a remote store::
  19. $ darc list hostname:path
  20. $ darc extract hostname:path::archive-name
  21. $ darc extract username@hostname:path::archive-name
  22. Definitions
  23. -----------
  24. Deduplication
  25. Deduplication is a technique for improving storage utilization by eliminating
  26. redundant data.
  27. Archive
  28. A Darc archive is a collection of files along with metadata that include file
  29. permissions, directory structure and various file attributes.
  30. Store
  31. A Darc store is a filesystem directory storing data from zero or more archives.
  32. The data in a store is both deduplicated and encrypted making it both
  33. efficient and safe.
  34. Key file
  35. When a Darc store is initialized a key file containing a password protected
  36. encryption key is created. It is vital to keep this file safe since the store
  37. data is totally inaccessible without it.
  38. Requirements
  39. ------------
  40. * Python >= 2.5
  41. * pycrypto
  42. * msgpack-python
  43. * paramiko (for remote store support)
  44. Installation
  45. ------------
  46. The following instructions will install Darc in ``/usr/local/darc/`` without interfering
  47. with the rest of the system.
  48. 1. Initialize a new python environment::
  49. $ virtualenv /usr/local/darc
  50. 2. Extract the source code using GIT or a release tarball::
  51. $ mkdir /usr/local/darc/src/
  52. $ cd /usr/local/darc/src/
  53. $ tar -xvzf darc-x.y.tar.gz
  54. OR
  55. $ git clone git://github.com/jborg/darc.git
  56. 3. Install Darc::
  57. $ cd darc-x.y/
  58. $ ../../bin/python setup.py install
  59. 4. Add /usr/local/darc/bin to $PATH
  60. Basic Usage
  61. ===========
  62. Initializing a store
  63. --------------------
  64. Before the first archive can be created a store needs to be initialized::
  65. $ darc init /data/my-backup.darc
  66. Initializing store "/data/my-backup.darc"
  67. Key file password (Leave blank for no password): *****
  68. Key file password again: *****
  69. Key file "/home/YOU/.darc/keys/data_my_backup_darc" created.
  70. Remember that this file (and password) is needed to access your data. Keep it safe!
  71. Archive creation
  72. ----------------
  73. The following command will create a new archive called ``backup-2011-09-10`` containing
  74. all files in ``~/Documents`` and ``~/src``::
  75. $ darc create -v /data/my-backup.darc::backup-2011-09-10 ~/Documents ~/src
  76. Extract an archive
  77. ------------------
  78. The following command will extract the archive ``backup-2011-09-10``::
  79. $ darc extract -v /data/my-backup.darc::backup-2011-09-10
  80. Delete an archive
  81. -----------------
  82. The following command will delete archive ``backup-2011-09-10``::
  83. $ darc delete /data/my-backup.darc::backup-2011-09-10
  84. List store contents
  85. -------------------
  86. The following command will list the names of all archives in the store::
  87. $ darc list /data/my-backup.darc
  88. backup-2011-09-09
  89. backup-2011-09-10
  90. ...
  91. List archive contents
  92. ---------------------
  93. The following command will list the contents of the ``backup-2011-09-10`` archive::
  94. $ darc list /data/my-backup.darc::backup-2011-09-10
  95. -rw-r--r-- YOU users 280 May 14 2010 home/YOU/Documents/something.txt
  96. -rw-r--r-- YOU users 280 May 14 2010 home/YOU/Documents/something-else.pdf
  97. ...
  98. Prune old archives
  99. ------------------
  100. When performing automatic backups it is important to periodically prune old backup
  101. archives to stop the store from growing too big.
  102. The following command will prune old archives and only keep the
  103. seven latest end of day archives and the five latest end of week archives::
  104. $ darc prune --daily=7 --weekly=5 /data/my-backup.darc
  105. Indices and tables
  106. ==================
  107. * :ref:`genindex`
  108. * :ref:`search`