github.com/advanderveer/restic@v0.8.1-0.20171209104529-42a8c19aaea6/doc/045_working_with_repos.rst (about) 1 .. 2 Normally, there are no heading levels assigned to certain characters as the structure is 3 determined from the succession of headings. However, this convention is used in Python’s 4 Style Guide for documenting which you may follow: 5 6 # with overline, for parts 7 * for chapters 8 = for sections 9 - for subsections 10 ^ for subsubsections 11 " for paragraphs 12 13 14 ######################### 15 Working with repositories 16 ######################### 17 18 Listing all snapshots 19 ===================== 20 21 Now, you can list all the snapshots stored in the repository: 22 23 .. code-block:: console 24 25 $ restic -r /tmp/backup snapshots 26 enter password for repository: 27 ID Date Host Tags Directory 28 ---------------------------------------------------------------------- 29 40dc1520 2015-05-08 21:38:30 kasimir /home/user/work 30 79766175 2015-05-08 21:40:19 kasimir /home/user/work 31 bdbd3439 2015-05-08 21:45:17 luigi /home/art 32 590c8fc8 2015-05-08 21:47:38 kazik /srv 33 9f0bc19e 2015-05-08 21:46:11 luigi /srv 34 35 You can filter the listing by directory path: 36 37 .. code-block:: console 38 39 $ restic -r /tmp/backup snapshots --path="/srv" 40 enter password for repository: 41 ID Date Host Tags Directory 42 ---------------------------------------------------------------------- 43 590c8fc8 2015-05-08 21:47:38 kazik /srv 44 9f0bc19e 2015-05-08 21:46:11 luigi /srv 45 46 Or filter by host: 47 48 .. code-block:: console 49 50 $ restic -r /tmp/backup snapshots --host luigi 51 enter password for repository: 52 ID Date Host Tags Directory 53 ---------------------------------------------------------------------- 54 bdbd3439 2015-05-08 21:45:17 luigi /home/art 55 9f0bc19e 2015-05-08 21:46:11 luigi /srv 56 57 Combining filters is also possible. 58 59 60 Checking a repo's integrity and consistency 61 =========================================== 62 63 Imagine your repository is saved on a server that has a faulty hard 64 drive, or even worse, attackers get privileged access and modify your 65 backup with the intention to make you restore malicious data: 66 67 .. code-block:: console 68 69 $ sudo echo "boom" >> backup/index/d795ffa99a8ab8f8e42cec1f814df4e48b8f49129360fb57613df93739faee97 70 71 In order to detect these things, it is a good idea to regularly use the 72 ``check`` command to test whether everything is alright, your precious 73 backup data is consistent and the integrity is unharmed: 74 75 .. code-block:: console 76 77 $ restic -r /tmp/backup check 78 Load indexes 79 ciphertext verification failed 80 81 Trying to restore a snapshot which has been modified as shown above will 82 yield the same error: 83 84 .. code-block:: console 85 86 $ restic -r /tmp/backup restore 79766175 --target /tmp/restore-work 87 Load indexes 88 ciphertext verification failed 89