You are not logged in.
Pages: 1
Hello,
I want to achieve the following with rsync but not quite sure how to go about doing so.
When booting up my linux laptop I want any new or updated files/folders in a particular folder on my linux server to be downloaded onto my laptop replacing any existing files with the latest versions and creating those which don't exist. Additionally files which have been deleted on the server should also be deleted locally.
When shutting down my laptop I want any new/updated files on my laptop to be uploaded to my server in the same fashion as above including deleting files off the server which no longer exist on my laptop.
All of the above should be recursive and only updated/new files uploaded.
How can I achieve this?
Thanks.
Last edited by RAH (2008-06-26 16:28:55)
Offline
On startup, execute: 'rsync --delete -av <user>@<server>:<path> <local-folder>'
On shutdown, execute: 'rsync --delete -av <local-folder> <user>@<server>:<path>'
Last edited by Stythys (2008-06-26 11:16:33)
[home page] -- [code / configs]
"Once you go Arch, you must remain there for life or else Allan will track you down and break you."
-- Bregol
Offline
You could use grsync, a GUI for rsync to easilly see how rsync works. Take a look in this link also:
Offline
How can I exclude a certain local directory from being synced?
Offline
I really, really suggest you read the rsync manpage. These simple questions can be answered from there.
--exclude=PATTERN
This option is a simplified form of the --filter option that
defaults to an exclude rule and does not allow the full rule-
parsing syntax of normal filter rules.
See the FILTER RULES section for detailed information on this
option.
Example usage (from the same manpage):
rsync -avuzb --exclude='*~' samba:samba/ .
Offline
Pages: 1