1833779 Members
2601 Online
110063 Solutions
New Discussion

rsync

 
Prashant Zanwar_4
Respected Contributor

rsync

Can rsync be used to just copy the file to destination server, directory and can i overwrite the destination file?
Prashant
"Intellect distinguishes between the possible and the impossible; reason distinguishes between the sensible and the senseless. Even the possible can be senseless."
3 REPLIES 3
H.Merijn Brand (procura
Honored Contributor

Re: rsync

yes.

rsync is meant to keep the destination `in sync' with the target

# rsync -avz --delete server::itrc .

is the command you will usually issue on the destination side

On the server side, there is a configuration file, probably /etc/rsyncd.conf that might look like

--8<---
hosts allow = 123.234.12.0/24,10.11.13.0/24,210.21.2.210
use chroot = no
max connections = 10
pid file = /var/run/rsyncd.pid
uid = 9999
gid = 999

[itrc]
path = /your/path/to/itrc
comment = HP ITRC area
auth users = merijn,phrasant,iogonex
secrets file = /var/rsyncd/secrets
-->8---

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
Prashant Zanwar_4
Respected Contributor

Re: rsync

I want to copy just a single file and replace file at destination, source and destination file name do not match?
How would I acheive this ?
Thanks
Prashant
"Intellect distinguishes between the possible and the impossible; reason distinguishes between the sensible and the senseless. Even the possible can be senseless."
H.Merijn Brand (procura
Honored Contributor

Re: rsync

Not with rsync.

Use rcp or scp

# rcp /local/file remote:/completely/different/name

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn