github.com/advanderveer/restic@v0.8.1-0.20171209104529-42a8c19aaea6/doc/faq.rst (about) 1 FAQ 2 === 3 4 This is the list of Frequently Asked Questions for restic. 5 6 ``restic check`` reports packs that aren't referenced in any index, is my repository broken? 7 -------------------------------------------------------------------------------------------- 8 9 When ``restic check`` reports that there are pack files in the 10 repository that are not referenced in any index, that's (in contrast to 11 what restic reports at the moment) not a source for concern. The output 12 looks like this: 13 14 :: 15 16 $ restic check 17 Create exclusive lock for repository 18 Load indexes 19 Check all packs 20 pack 819a9a52e4f51230afa89aefbf90df37fb70996337ae57e6f7a822959206a85e: not referenced in any index 21 pack de299e69fb075354a3775b6b045d152387201f1cdc229c31d1caa34c3b340141: not referenced in any index 22 Check snapshots, trees and blobs 23 Fatal: repository contains errors 24 25 The message means that there is more data stored in the repo than 26 strictly necessary. With high probability this is duplicate data. In 27 order to clean it up, the command ``restic prune`` can be used. The 28 cause of this bug is not yet known. 29 30 How can I specify encryption passwords automatically? 31 ----------------------------------------------------- 32 33 When you run ``restic backup``, you need to enter the passphrase on 34 the console. This is not very convenient for automated backups, so you 35 can also provide the password through the ``--password-file`` option, or one of 36 the environment variables ``RESTIC_PASSWORD`` or ``RESTIC_PASSWORD_FILE``. 37 A discussion is in progress over implementing unattended backups happens in 38 :issue:`533`. 39 40 .. important:: Be careful how you set the environment; using the env 41 command, a `system()` call or using inline shell 42 scripts (e.g. `RESTIC_PASSWORD=password restic ...`) 43 might expose the credentials in the process list 44 directly and they will be readable to all users on a 45 system. Using export in a shell script file should be 46 safe, however, as the environment of a process is 47 `accessible only to that user`_. Please make sure that 48 the permissions on the files where the password is 49 eventually stored are safe (e.g. `0600` and owned by 50 root). 51 52 .. _accessible only to that user: https://security.stackexchange.com/questions/14000/environment-variable-accessibility-in-linux/14009#14009 53 54 How to prioritize restic's IO and CPU time 55 ------------------------------------------ 56 57 If you'd like to change the **IO priority** of restic, run it in the following way 58 59 :: 60 61 $ ionice -c2 -n0 ./restic -r /media/your/backup/ backup /home 62 63 This runs ``restic`` in the so-called best *effort class* (``-c2``), 64 with the highest possible priority (``-n0``). 65 66 Take a look at the `ionice manpage`_ to learn about the other classes. 67 68 .. _ionice manpage: https://linux.die.net/man/1/ionice 69 70 71 To change the **CPU scheduling priority** to a higher-than-standard 72 value, use would run: 73 74 :: 75 76 $ nice --10 ./restic -r /media/your/backup/ backup /home 77 78 Again, the `nice manpage`_ has more information. 79 80 .. _nice manpage: https://linux.die.net/man/1/nice 81 82 You can also **combine IO and CPU scheduling priority**: 83 84 :: 85 86 $ ionice -c2 nice -n19 ./restic -r /media/gour/backup/ backup /home 87 88 This example puts restic in the IO class 2 (best effort) and tells the CPU 89 scheduling algorithm to give it the least favorable niceness (19). 90 91 The above example makes sure that the system the backup runs on 92 is not slowed down, which is particularly useful for servers. 93 94 Creating new repo on a Synology NAS via sftp fails 95 -------------------------------------------------- 96 97 Sometimes creating a new restic repository on a Synology NAS via sftp fails 98 with an error similar to the following: 99 100 :: 101 102 $ restic init -r sftp:user@nas:/volume1/restic-repo init 103 create backend at sftp:user@nas:/volume1/restic-repo/ failed: 104 mkdirAll(/volume1/restic-repo/index): unable to create directories: [...] 105 106 Although you can log into the NAS via SSH and see that the directory structure 107 is there. 108 109 The reason for this behavior is that apparently Synology NAS expose a different 110 directory structure via sftp, so the path that needs to be specified is 111 different than the directory structure on the device and maybe even as exposed 112 via other protocols. 113 114 The following may work: 115 116 :: 117 $ restic init -r sftp:user@nas:/restic-repo init