index.rst 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  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 compressed and added to the repository.
  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 repositories
  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 repository::
  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. Repository
  31. A Darc repository 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 >= 3.2
  41. * msgpack-python
  42. Installation
  43. ------------
  44. The following instructions will install Darc in ``/usr/local/darc/`` without interfering
  45. with the rest of the system.
  46. 1. Initialize a new python environment::
  47. $ virtualenv /usr/local/darc
  48. 2. Extract the source code using GIT or a release tarball::
  49. $ mkdir /usr/local/darc/src/
  50. $ cd /usr/local/darc/src/
  51. $ tar -xvzf darc-x.y.tar.gz
  52. OR
  53. $ git clone git://github.com/jborg/darc.git
  54. 3. Install Darc::
  55. $ cd darc-x.y/
  56. $ ../../bin/python setup.py install
  57. 4. Add /usr/local/darc/bin to $PATH
  58. Basic Usage
  59. ===========
  60. Initializing a store
  61. --------------------
  62. Before the first archive can be created a store needs to be initialized::
  63. $ darc init /data/my-backup.darc
  64. Initializing repository at "/data/my-backup.darc"
  65. Key file password (Leave blank for no password): *****
  66. Key file password again: *****
  67. Key file "/home/YOU/.darc/keys/data_my_backup_darc" created.
  68. Remember that this file (and password) is needed to access your data. Keep it safe!
  69. Archive creation
  70. ----------------
  71. The following command will create a new archive called ``backup-2011-09-10`` containing
  72. all files in ``~/Documents`` and ``~/src``::
  73. $ darc create -v /data/my-backup.darc::backup-2011-09-10 ~/Documents ~/src
  74. Extract an archive
  75. ------------------
  76. The following command will extract the archive ``backup-2011-09-10``::
  77. $ darc extract -v /data/my-backup.darc::backup-2011-09-10
  78. Delete an archive
  79. -----------------
  80. The following command will delete archive ``backup-2011-09-10``::
  81. $ darc delete /data/my-backup.darc::backup-2011-09-10
  82. List store contents
  83. -------------------
  84. The following command will list the names of all archives in the store::
  85. $ darc list /data/my-backup.darc
  86. backup-2011-09-09
  87. backup-2011-09-10
  88. ...
  89. List archive contents
  90. ---------------------
  91. The following command will list the contents of the ``backup-2011-09-10`` archive::
  92. $ darc list /data/my-backup.darc::backup-2011-09-10
  93. -rw-r--r-- YOU users 280 May 14 2010 home/YOU/Documents/something.txt
  94. -rw-r--r-- YOU users 280 May 14 2010 home/YOU/Documents/something-else.pdf
  95. ...
  96. Prune old archives
  97. ------------------
  98. When performing automatic backups it is important to periodically prune old backup
  99. archives to stop the store from growing too big.
  100. The following command will prune old archives and only keep the
  101. seven latest end of day archives and the five latest end of week archives::
  102. $ darc prune --daily=7 --weekly=5 /data/my-backup.darc
  103. Indices and tables
  104. ==================
  105. * :ref:`genindex`
  106. * :ref:`search`