2017-01-18 20:48:39 +00:00
|
|
|
FAQ
|
|
|
|
===
|
|
|
|
|
2017-01-18 20:57:59 +00:00
|
|
|
This is the list of Frequently Asked Questions for restic.
|
2017-01-18 20:48:39 +00:00
|
|
|
|
2017-04-17 18:53:38 +00:00
|
|
|
``restic check`` reports packs that aren't referenced in any index, is my repository broken?
|
|
|
|
--------------------------------------------------------------------------------------------
|
2017-01-18 20:48:39 +00:00
|
|
|
|
2017-04-17 18:53:38 +00:00
|
|
|
When ``restic check`` reports that there are pack files in the
|
|
|
|
repository that are not referenced in any index, that's (in contrast to
|
|
|
|
what restic reports at the moment) not a source for concern. The output
|
|
|
|
looks like this:
|
|
|
|
|
|
|
|
::
|
2017-01-18 20:48:39 +00:00
|
|
|
|
|
|
|
$ restic check
|
|
|
|
Create exclusive lock for repository
|
|
|
|
Load indexes
|
|
|
|
Check all packs
|
|
|
|
pack 819a9a52e4f51230afa89aefbf90df37fb70996337ae57e6f7a822959206a85e: not referenced in any index
|
|
|
|
pack de299e69fb075354a3775b6b045d152387201f1cdc229c31d1caa34c3b340141: not referenced in any index
|
|
|
|
Check snapshots, trees and blobs
|
|
|
|
Fatal: repository contains errors
|
|
|
|
|
2017-04-17 18:53:38 +00:00
|
|
|
The message means that there is more data stored in the repo than
|
|
|
|
strictly necessary. With high probability this is duplicate data. In
|
|
|
|
order to clean it up, the command ``restic prune`` can be used. The
|
|
|
|
cause of this bug is not yet known.
|
2017-09-16 14:17:36 +00:00
|
|
|
|
|
|
|
How can I specify encryption passwords automatically?
|
|
|
|
-----------------------------------------------------
|
|
|
|
|
2017-09-18 12:55:18 +00:00
|
|
|
When you run ``restic backup``, you need to enter the passphrase on
|
2017-09-16 14:17:36 +00:00
|
|
|
the console. This is not very convenient for automated backups, so you
|
2017-09-23 17:15:21 +00:00
|
|
|
can also provide the password through the ``--password-file`` option, or one of
|
|
|
|
the environment variables ``RESTIC_PASSWORD`` or ``RESTIC_PASSWORD_FILE``
|
|
|
|
environment variables. A discussion is in progress over implementing unattended
|
|
|
|
backups happens in :issue:`533`.
|
2017-09-16 14:17:36 +00:00
|
|
|
|
|
|
|
.. important:: Be careful how you set the environment; using the env
|
|
|
|
command, a `system()` call or using inline shell
|
2017-09-23 17:15:21 +00:00
|
|
|
scripts (e.g. `RESTIC_PASSWORD=password restic ...`)
|
2017-09-16 14:17:36 +00:00
|
|
|
might expose the credentials in the process list
|
|
|
|
directly and they will be readable to all users on a
|
|
|
|
system. Using export in a shell script file should be
|
|
|
|
safe, however, as the environment of a process is
|
2017-09-18 12:55:18 +00:00
|
|
|
`accessible only to that user`_. Please make sure that
|
|
|
|
the permissions on the files where the password is
|
|
|
|
eventually stored are safe (e.g. `0600` and owned by
|
|
|
|
root).
|
2017-09-16 14:17:36 +00:00
|
|
|
|
|
|
|
.. _accessible only to that user: https://security.stackexchange.com/questions/14000/environment-variable-accessibility-in-linux/14009#14009
|
2017-09-23 17:32:07 +00:00
|
|
|
|
|
|
|
How to prioritize restic's IO and CPU time
|
|
|
|
------------------------------------------
|
|
|
|
|
|
|
|
If you'd like to change the **IO priority** of restic, run it in the following way
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
$ ionice -c2 -n0 ./restic -r /media/your/backup/ backup /home
|
|
|
|
|
|
|
|
This runs ``restic`` in the so-called best *effort class* (``-c2``),
|
|
|
|
with the highest possible priority (``-n0``).
|
|
|
|
|
|
|
|
Take a look at the `ionice manpage`_ to learn about the other classes.
|
|
|
|
|
|
|
|
.. _ionice manpage: https://linux.die.net/man/1/ionice
|
|
|
|
|
|
|
|
|
|
|
|
To change the **CPU scheduling priority** to a higher-than-standard
|
|
|
|
value, use would run:
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
$ nice --10 ./restic -r /media/your/backup/ backup /home
|
|
|
|
|
|
|
|
Again, the `nice manpage`_ has more information.
|
|
|
|
|
|
|
|
.. _nice manpage: https://linux.die.net/man/1/nice
|
|
|
|
|
|
|
|
You can also **combine IO and CPU scheduling priority**:
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
$ ionice -c2 nice -n19 ./restic -r /media/gour/backup/ backup /home
|
|
|
|
|
|
|
|
This example puts restic in the IO class 2 (best effort) and tells the CPU
|
|
|
|
scheduling algorithm to give it the least favorable niceness (19).
|
|
|
|
|
|
|
|
The above example makes sure that the system the backup runs on
|
|
|
|
is not slowed down, which is particularly useful for servers.
|