首页 > 系统相关 >Linux中安装使用rsync

Linux中安装使用rsync

时间:2022-10-09 14:04:04浏览次数:75  
标签:rsync -- work rsyncd file Linux home 安装


获取 rsync-3.1.0  我的网盘里放了一个 。地址:

​http://pan.baidu.com/s/1dDs4lSt​


安装

rsync-3.1.0.tar.gz 
#tar zxvf rsync-3.1.0.tar.gz
#cd rsync-3.1.0
#./configure --prefix=/home/work/rsync
#make 
#make install


配置文件 举例


<span style="font-size:18px;">use chroot = no
max connections=36000
log file=/home/work/rsync/log/rsyncd.log
pid file=/home/work/rsync/rsyncd.pid
lock file=/home/work/rsync/rsyncd.lock

[data]
path = /home/work/www/
comment = data
auth users = work
uid = work
gid = work
secrets file = /home/work/rsync/etc/rsyncd.pas
read only = false
write only = yes</span>


启动

rsync --daemon --port 3334 --config=/home/work/rsync/conf/rsyncd.conf


错误1

@ERROR: setgroups failed
rsync error: error starting client-server protocol (code 5) at main.c(1503) [sender=3.0.6]

这个错我是由于 起服务的 rsync 和 传输的rsync的版本不用。后来换成一个版本后就好了。


推送命令

/home/work/rsync/bin/rsync -vzrtopg --progress --password-file=/home/work/fupeng/rsync/rsync.pas --port=3334 --bwlimit=20560   --exclude-from=/home/work/fupeng/batch_tool/push/exclude.txt  /home/work/www/ [email protected]::download

上面这个命令是 带 排除功能的推送

在exclude.txt   中写上 不想推送的文件,支持正则表达式。





标签:rsync,--,work,rsyncd,file,Linux,home,安装
From: https://blog.51cto.com/u_15815563/5740296

相关文章

  • 记录Linux下启动docker中Mysql,并进入mysql。
    1.启动dockersystemctlstartdocker  2.查看docker容器启动信息,并找到mysql容器  3.使用进程名启动mysql:dockerstartmysql-test;也可以使用进程id启动:docker......
  • MQTT服务端安装ubuntu
    https://blog.csdn.net/weixin_43850980/article/details/122217933MQTT安装发送订阅terminalmosquitto_pub-t"test"-m"msssss测试内容"接收订阅terminalmosquitto_......
  • CnetOS 7.9 安装 sqlite3
    一、CnetOS7.9安装sqlite3地址https://www.sqlite.orghttps://github.com/sqlite/sqlitehttps://www.sqlite.org/2022/sqlite-autoconf-3390400.tar.gz wg......
  • CentOS 7.9 安装 django-3.2.10
    一、CentOS7.9安装django-3.2.10地址https://www.djangoproject.comhttps://github.com/django/django二、安装django先得安装pythonpython3python3-Vpip3-......
  • linux 定时任务 加锁
    ​​*/3****flock-xn/home/work/fupeng/oem_apk_new.lock-c'sh/home/work/fupeng/oem_apk_new.sh>/dev/null2>&1'>/dev/null2>&1......
  • pip 安装
    ​​PythonPackageIndex​​ Python包序列,这个软件是PyPA推荐的安装Python包的工具。安装方法:1,进入https://pypi.python.org/pypi/pip官网2,下载压缩包 ​​pip-6.0......
  • Linux系统睡眠
    参考Linuxkernel文档Documentation\admin-guide\pm\sleep-states.rstSystemSleepStates—TheLinuxKerneldocumentation系统睡眠状态名称ACPIState说明唤......
  • 一份最好的Docker 安装教程
    ## 到开源的社区的怀抱中去 阿里云社区,给我们提供非常多的教程,都是最专业的人。 ## 不复制粘贴了,放一个安装教程的链接过来​​https://yq.aliyun.com/articles/110......
  • maven篇1: 安装、设置和环境变量配置
    一、为什么需要maven①一个项目就是一个工程如果项目非常庞大,就不适合使用package来划分模块,最好是每一个模块对应一个工程,利于分工协作。借助于maven就可以将一个项目拆分......
  • linux下解压zip 命令
    ## 基础命令是 unzip 解压在当前目录下,我以解压一个 logstash 的压缩包为例  unziplogstash-7.5.1.zip  ## 解压到指定目录下   这个是常用的,可以看到下......