meta data for this page
This is an old revision of the document!
sudo apt-get install duply python-paramiko trickle
Create backup profile:
duply gitlab create
Profile file $HOME/.duply/gitlab/conf
was created.
Generate random password:
openssl rand -base64 20
- ~/.duply/gitlab/conf
#GPG_KEY= GPG_PW='<generated passsword>'
Configure backup section:
- ~/.duply/gitlab/conf
# Paramiko SSH is very CPU consuming #TARGET='scp://gitlabbackup@192.168.0.230//mnt/backup/gitlabbackup' TARGET='sftp://gitlabbackup@192.168.0.230//mnt/backup/gitlabbackup' # Limit network speed DUPL_PRECMD="trickle -s -u 1500 -d 256" SOURCE='/' MAX_AGE=6M VOLSIZE=256 DUPL_PARAMS="$DUPL_PARAMS --volsize $VOLSIZE " # Specify different id_rsa file: DUPL_PARAMS="$DUPL_PARAMS --ssh-options=-oIdentityFile='/root/.duply/gitlab/id_rsa' " DUPL_PARAMS="$DUPL_PARAMS --no-compression "
- ~/.duply/gitlab/exclude
+ /etc/gitlab + /opt + /home + /root - **
Start the backup
sudo duply gitlab backup --progress
duply gitlab status
duply gitlab list
duply gitlab verify # long operation
SFTP and rbash
- /etc/passwd
mybackup:x:1002:1002:Backup,,,:/home/mybackup:/bin/rbash
- /etc/ssh/sshd_config
Subsystem sftp internal-sftp
Issues
ssh: Exception: Incompatible ssh peer (no acceptable kex algorithm)
Python paramiko module needs upgrade
apt-get install python-pip python-dev python-cffi libffi-dev build-essential pip install --ugprade cffi pip install pycparser==2.13 pip install --ugprade cryptography
To solve error “AssertionError: sorry, but this version only supports 100 named groups” please install
pip install pycparser==2.13
pip install --ugprade paramiko