LINUX.ORG.RU

rsync бэкап файлов из списка


0

1

Здравствуйте! Пытаюсь побороть rsync! Нужно бэкапить файлы из списка типа:

/etc/cgrules.conf
/etc/dnsmasq.conf
/etc/dracut.conf
/etc/fprintd.conf
/etc/grub.conf
/etc/hba.conf
/etc/host.conf
итд.

Делаю так rsync -a --files-from=/mnt/list_conf.txt /mnt/share

Вылетает ошибка
rsync error: syntax or usage error (code 1) at options.c(1651) [client=3.0.7]

man rsync:

              The  filenames  that are read from the FILE are all relative to the source dir — any leading slashes are removed and no ".." references are allowed to go higher
              than the source dir.  For example, take this command:

                 rsync -a --files-from=/tmp/foo /usr remote:/backup

              If /tmp/foo contains the string "bin" (or even "/bin"), the /usr/bin directory will be created as /backup/bin on the remote host.  If it contains  "bin/"  (note
              the  trailing slash), the immediate contents of the directory would also be sent (without needing to be explicitly mentioned in the file — this began in version
              2.6.4).  In both cases, if the -r option was enabled, that dir’s entire hierarchy would also be transferred (keep in mind that -r needs to be specified  explic‐
              itly  with  --files-from, since it is not implied by -a).  Also note that the effect of the (enabled by default) --relative option is to duplicate only the path
              info that is read from the file — it does not force the duplication of the source-spec path (/usr in this case).

Обратите внимание: список файлов читается относительно не указанной в Вашем случае source directory.

Попробуйте rsync -a --files-from=/mnt/list_conf.txt / /mnt/share

AITap ★★★★★
()

попробуй так:

rsync -a --files-from=/mnt/list_conf.txt / /mnt/share 

power
()
Ответ на: комментарий от AITap

rsync -a --files-from=/mnt/list_conf.txt / /mnt/share Действительно, man невнимательно посматривал.. Огромное спасибо!

В процессе получаю кучу таких ошибок,

rsync: symlink «/mnt/share/etc/fonts/conf.d/65-fonts-persian.conf» -> "../conf.avail/65-fonts-persian.conf" failed: Operation not supported (95)

команда -a подразумевает копирование symlink ... хммм =(((

addicted
() автор топика
Ответ на: комментарий от addicted

Ага ))) Я правильно понимаю, что все это происходит из за того, что папка куда я копирую бэкап является шарой на WIN машине (mount -t cifs )..

cifs 385969624 262614068 123355556

addicted
() автор топика
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.