Rsnapshot警告:无法lchown()符号链接"/path/to/file"错误和解决方案
时间:2020-01-09 10:44:07 来源:igfitidea点击:
我在Debian Linux 5.x下为我的网络启动并运行了基于rsnapshot的备份服务器。
但是,每当我使用以下命令运行备份作业时:rsnapshot -v -c /root/rsnapshot.server1.conf每小时,我会在屏幕上收到以下消息:
WARNING: Could not lchown() symlink “/nas/.rsnapshot/hourly.1/server1.example.com/etc/alternatives/locate”
WARNING: Could not lchown() symlink “/nas/.rsnapshot/hourly.1/server1.example.com/etc/alternatives/nc.1.gz”
WARNING: Could not lchown() symlink “/nas/.rsnapshot/hourly.1/server1.example.com/etc/alternatives/jexec-binfmt”
WARNING: Could not lchown() symlink “/nas/.rsnapshot/hourly.1/server1.example.com/etc/alternatives/servertool”
我该如何解决这个问题?
您需要在支持lchown的系统上安装Lchown模块,该模块为lchown UNIX系统调用提供perl接口。
lchown()调用用于更改符号链接的所有权和组。
要安装相同的文件,请执行:
sudo apt-get update sudo apt-get install liblchown-perl
输出示例:
Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: xmms2-plugin-pulse xmms2-plugin-id3v2 xmms2-plugin-alsa xmms2-core xmms2-plugin-vorbis xmms2-plugin-mad xmms2-client-cli Use 'apt-get autoremove' to remove them. The following NEW packages will be installed: liblchown-perl 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 9,574B of archives. After this operation, 81.9kB of additional disk space will be used. Get:1 http://archive.ubuntu.com karmic/universe liblchown-perl 1.00-1 [9,574B] Fetched 9,574B in 0s (10.9kB/s) Selecting previously deselected package liblchown-perl. (Reading database ... 123150 files and directories currently installed.) Unpacking liblchown-perl (from .../liblchown-perl_1.00-1_amd64.deb) ... Processing triggers for man-db ... Setting up liblchown-perl (1.00-1) ...
对于其他类似UNIX的操作系统
使用软件包管理器或者从cpan.org下载它,或者使用cpan命令/shell安装它:
cpan -A Lchown cpan -i Lchown