README 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. kopano-backup is a MAPI-level backup/restore tool. it has three parts.
  2. BACKUP
  3. -kopano-backup can sync complete users/stores to disk, to be restored at a later time (-u, -S)
  4. -it can sync multiple stores in parallel (for performance reasons, not folders; -w)
  5. -it uses ICS to incrementally sync the respective MAPI items
  6. -there is an option to sync only certain folders (-f, --recursive)
  7. -it uses python-kopano to serialize items (item.dumps())
  8. -the on-disk layout is basically a per-store (user) hierarchical directory tree,
  9. with one directory for each MAPI folder
  10. -for each MAPI folder, the following files are maintained:
  11. 'items': key-value store containing serialized version of every item in the folder
  12. 'index': key-value store containinfg subjects and dates for every item (for performance)
  13. 'state': ICS state
  14. 'path': folder path, for example 'Inbox/subfolder'
  15. 'meta': contains rules, acls, delegates for this folder
  16. 'folder': contains folder properties
  17. -for each user/store, the properties are also stored globally as 'user'/'store'
  18. -only a certain period may be backed up (-b, -e), though this may give weird effects when
  19. combining with incremental backup
  20. -there are certain options to skip e.g. attachments, junk mail, deleted items..
  21. RESTORE
  22. -kopano-backup --restore can restore complete users/stores back from disk
  23. -the single argument given is the name of the directory which should be restored
  24. -the user/account to restore to is taken from the directory name (-u can be used to specify otherwise)
  25. -a 'restore root' can be specified, where to restore everything under (--restore-root, e.g. "dump/user3")
  26. -there is an option to sync only certain folders (-f, --recursive)
  27. -there is an option to restore only certain items, by sourcekey (--sourcekey; see STATS/INDEX below)
  28. -it maintains original sourcekeys (PR_EC_BACKUP_SOURCE_KEY)
  29. -if it detects a duplicate sourcekey, it will complain and not restore the respective item
  30. -there is an option to specify a certain time period
  31. -there are certain options to skip e.g. attachments, junk mail, deleted items..
  32. -it should be mostly possible to restore on a different server, though this may result in minor data loss
  33. -it is not parallelized at this point, but could be in the future
  34. -when restoring items, they get a new sourcekey. but we'd like to check for duplicates, so we restore the
  35. original sourcekey as PR_EC_BACKUP_SOURCEKEY
  36. STATS/INDEX
  37. -kopano-backup --stats gives a high-level summary of the contents of a backup directory
  38. -kopano-backup --index shows all items contained in the backup directory, including folder path, subject and date
  39. -the output format in both cases is CSV, which can be imported and inspected in e.g. LibreOffice
  40. -there is an option to specify a certain time period
  41. -to search for a specific subject, of course grep may be used.