Rsync的其他几个常见参数
2016-09-10 19:18
183 查看
问题:Rsync的其他几个常见参数
1
-z –compress compress file data during the transfer
--compress-level=NUM explicitly set compression level
--skip-compress=LIST skip compressing files with suffix in LIST
压缩传输,如果网络带宽不够,那么应该压缩以后传输,消耗的当然是机器资源,但是如果内网传输的话,文件数量不是很多的话,这个参数不必要的。
2
--password-file=FILE
前面说过了,只有远端机器是rsync服务器,才能用这个参数
如果你以为个FILE写的是ssh 登陆的密码,那就大错特错了,不少人犯了这个错误。
3
–stats: Adds a little more output regarding the file transfer status.
4
–progress: shows the progress of each file transfer. Can be useful to know if you have large files being backup up.
rsync后面跟着的参数
1.编写/root/shell/test.include文件
2.rsync同步指定文件,目录
参照网上写的,rsync -nrv --include-from=/root/shell/test.include --exclude=* /var/www/test/public/ /tmp/test/public,发现任何文件都没有同步。原来--exlucde=*是不行的,需要指定--exclude=/*。估计意思是指当前目录/var/www/test/public/下的所有文件目录。--exclude=*/则是指定当前目录/var/www/test/public/下的所有目录。
这里要注意/var/www/test/public/需要添加最后的/
1
-z –compress compress file data during the transfer
--compress-level=NUM explicitly set compression level
--skip-compress=LIST skip compressing files with suffix in LIST
压缩传输,如果网络带宽不够,那么应该压缩以后传输,消耗的当然是机器资源,但是如果内网传输的话,文件数量不是很多的话,这个参数不必要的。
2
--password-file=FILE
前面说过了,只有远端机器是rsync服务器,才能用这个参数
如果你以为个FILE写的是ssh 登陆的密码,那就大错特错了,不少人犯了这个错误。
3
–stats: Adds a little more output regarding the file transfer status.
4
–progress: shows the progress of each file transfer. Can be useful to know if you have large files being backup up.
rsync后面跟着的参数
1.编写/root/shell/test.include文件
代码如下 | 复制代码 |
# cat /root/shell/test.include js css |
代码如下 | 复制代码 |
# rsync -nrv --include-from=/root/shell/test.include --exclude=/* /var/www/test/public/ /tmp/test/public -n, --dry-run perform a trial run with no changes made //干跑,光显示哪些文件目录会被rsync而不运行,用于测试非常方便 -r, --recursive recurse into directories //详细模式输出 -v, --verbose increase verbosity //对子目录以递归模式处理 |
这里要注意/var/www/test/public/需要添加最后的/
相关文章推荐
- 几个正则表达式(1.ZF翻页url:保存其他参数,).
- 其他几个API(2)_获得数据库相关的信息_获得参数信息_获得结果信息
- 几个正则表达式(1.ZF翻页url:保存其他参数,).
- rsync 几个参数的用法
- java中多线程常见的几个参数
- socket的一个错误的解释SocketException以及其他几个常见异常
- rsync - 客户端其他参数
- C++其他几个常见操作程序
- 关于rsync共享服务的几个常见错误
- 几个正则表达式(1.ZF翻页url:保存其他参数,).
- Rsync常见错误及命令详细参数 推荐
- Rsync常见过错及指令具体参数
- SHOW SLAVE STATUS几个常见参数
- 介绍几个有关 ab 的有用的参数
- [Remoting FAQ]传递Remoting参数时遇到的两种常见错误
- jbuilderx常见几个问题
- 常见的几个数据库insert into操作的主键返回值
- 几个有用的SAP安全配置的用户参数配置列表
- VC常见的几个error
- 介绍几个有关 ab 的有用的参数