Bup

From miki
Jump to navigation Jump to search

References

Bup reviews:

Also details how to setup snapshot on Windows using vscsc to make consistent backups.
Someone commented that par2 should be replaced by zfec.

Install on Lacie-Cloudbox

git clone https://github.com/bup/bup
ipkg install attr libacl
ipkg install python27 py27-tornado py27-pip
which python
which python2
# optware python only available as "python2", and pip as "pip2.7"
pip2.7 install fuse-python
# pip2.7 install xattr libacl
# # error: /opt/local/lib/python2.5/site-packages (in --site-dirs) is not on sys.path
# export PYTHONPATH=/opt/local/lib/python2.5/site-packages
# # see https://forum.qnap.com/viewtopic.php?t=73608

pip2.7 install pyxattr pylibacl       # Do NOT install xattr

export PYTHON=/opt/bin/python2        # To avoid using /usr/bin/python, see bup doc.
make
make test                             # Many issues... see below.
make install PREFIX=/opt

Houston, we have a problem. We can reproduce as follows:

cat bup_intl_issue.py
# import posix1e;           # From package pylibacl
python bup_intl_issue.py
# /opt/bin/python2.7: symbol 'libintl_gettext': can't resolve symbol
# Traceback (most recent call last):
#   File "bup_intl_issue.py", line 1, in <module>
#     import posix1e;
# ImportError: unknown dlopen() error

We can fix the issue using the LD_PRELOAD trick though:

LD_PRELOAD=/opt/lib/libintl.so python2.7 bup_intl_issue.py

But this trick does not work when calling bup.

Let's postpone that. I've another problem when installing fuse-python:

pip2.7 install fuse-python
# Collecting fuse-python
#   Using cached fuse-python-0.2.tar.gz
#     Complete output from command python setup.py egg_info:
#     pkg-config unavailable, build terminated
#
#     ----------------------------------------
# Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-sKLWYV/fuse-python/

To run bup via ssh, we must add it to the PATH.

  • Make sure that PermitUserEnvironment yes is in the file sshd_config on the server.
  • Add to ~/.ssh/environment:
PATH=/opt/bin:/opt/local/bin:/opt/sbin:$PATH

Install on Raspberry-pi

git clone https://github.com/bup/bup
sudo apt install python2.7-dev python-fuse python-pyxattr python-pylibacl linux-libc-dev acl attr python-tornado pandoc
make
make test
sudo make install           # First run make install before checkinstall
sudo checkinstall           # ... or checkinstall fails