add a push-style example to borg-create docs
When I browsed the readthedocs and manpages while setting up Borg for
myself for the first time, I saw multiple hints that pushing backups via
SSH is supported (e.g. the existence of the `borg serve` command and the
`--rsh` option), but I never found a clear example. I only found
<https://borgbackup.readthedocs.io/en/stable/usage/general.html#repository-urls>
after being pointed to it by @ThomasWaldmann.
Therefore, an explicit example in the `borg create` documentation seems
appropriate. I put it next to the pull-style example using sshfs which
serves a similar usecase.
Before this fix, because known() only checked the key-type file, the
location file could go missing without being automatically regenerated.
Now a save() is triggered if not all files are present.
(cherry picked from commit c68cad9727)
the borg check --repair is needed to clean up all the orphaned chunks.
if the message is emitted on INFO log level, people likely do not see
it if they use default WARNING log level (they did not give -v).
(cherry picked from commit 389afcae9d)
if the remote server does not support the dict-based argument passing
yet (e.g. when accidentally using borg 0.29 on rsync.net), the GET rpc
call argument list failed to generate if the command currently being
processed was not a GET also.
note: rsync.net has a more recent borg as "borg1".
this happened because the user had pytest5 installed somehow,
although it is incompatible with python 3.4:
# python3 /usr/local/bin/borg --version
Traceback (most recent call last):
File "/usr/local/lib/python3.4/dist-packages/borg/archiver.py", line 81, in <module>
from .selftest import selftest
File "/usr/local/lib/python3.4/dist-packages/borg/selftest.py", line 21, in <module>
from .testsuite.hashindex import HashIndexDataTestCase, HashIndexRefcountingTestCase, HashIndexTestCase
File "/usr/local/lib/python3.4/dist-packages/borg/testsuite/__init__.py", line 29, in <module>
from pytest import raises
File "/usr/local/lib/python3.4/dist-packages/pytest.py", line 6, in <module>
from _pytest.assertion import register_assert_rewrite
File "/usr/local/lib/python3.4/dist-packages/_pytest/assertion/__init__.py", line 6, in <module>
from _pytest.assertion import rewrite
File "/usr/local/lib/python3.4/dist-packages/_pytest/assertion/rewrite.py", line 443, in <module>
ast.MatMult: "@",
AttributeError: 'module' object has no attribute 'MatMult'
This test assumed that zlib would always produce the same output for a
given input, and that assumption has proven incorrect. It rested on
zlib never improving. The zlib shipped in Clear Linux has algorithm
improvements, which caused this test to break.
This patch instead decompresses the expected value and compares that.
Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
It was broken because there's already a different reference named
github in `docs/global.rst.inc`. Fixed by using an anonymous hyperlink
reference, per https://stackoverflow.com/a/14067756/278488
The build process can be controlled via environment variables
similar to other bundled libraries in borgbackup. The main difference
is probably that upstream does not provide a pkgconfig file for
xxhash.
Therefore borg will probably fail to detect the system-provided
version by default (tested on Fedora, seems like Debian and Ubuntu
do not ship a pkgconfig file either). I kept the pkgconfig lookup
code anyway to keep the code as similar as possible to
"setup_compress.py"/"setup_crypto.py".
Setting BORG_LIBXXHASH_PREFIX=/usr helps borg to detect xxhash
on my system (Fedora). You can force the use of the bundled
version of xxhash by setting BORG_USE_BUNDLED_XXHASH=1.
compact / config: yes, should be optional (can get repo from BORG_REPO
environment variable)
some debug commands: rather not, have non-optional addtl. posargs