Answer the question
In order to leave comments, you need to log in
The server is not backed up, what could be?
Good afternoon. There is a combat server (FreeBSD) there is a backup server (Debian).
When running the config, it gives the following error:
@ERROR: chroot failed
rsync error: error starting client-server protocol (code 5) at main.c(1675) [Receiver=3.1.3]
Пт ноя 22 17:36:05 +06 2019
@ERROR chdir failed
rsync error: error starting client-server protocol (code 5) at main.c(1675) [Receiver=3.1.3]
#!/bin/bash
date
# Папка, куда будем складывать архивы
syst_dir=/backup/
# Имя сервера, который архивируем
srv_name=server1
# Адрес сервера, который архивируем
srv_ip=10.10.1.55
# Пользователь rsync на сервере, который архивируем
srv_user=backup
# Ресурс на сервере для бэкапа
srv_dir=data
echo "Start backup ${srv_name}"
# Создаем папку для инкрементных бэкапов
mkdir -p ${syst_dir}${srv_name}/increment/
# Запускаем непосредственно бэкап с параметрами
/usr/bin/rsync -a --delete --password-file=/etc/rsyncd.scrt ${srv_user}@${srv_ip}::${srv_dir} ${syst_dir}${srv_name}/current/ --backup --backup-dir=${syst_dir}${srv_name}/increment/`date +%Y-%m-%d`/
# Чистим папки с инкрементными архивами старше 30-ти дней
/usr/bin/find ${syst_dir}${srv_name}/increment/ -maxdepth 1 -type d -mtime +30 -exec rm -rf {} \;
date
echo "Finish backup ${srv_name}"
.
/backup3.sh
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question