2
0

index.rst 4.4 KB

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