Keep Remote Directory Up-to-date

后端 未结 17 2183
一向
一向 2021-01-30 06:39

I absolutely love the Keep Remote Directory Up-to-date feature in Winscp. Unfortunately, I can\'t find anything as simple to use in OS X or Linux. I know the same thing can

17条回答
  •  忘掉有多难
    2021-01-30 07:25

    You could always use version control, like SVN, so all you have to do is have the server run svn up on a folder every night. This runs into security issues if you are sharing your files publicly, but it works.

    If you are using Linux though, learn to use rsync. It's really not that difficult as you can test every command with -n. Go through the man page, the basic format you will want is

    rsync [OPTION...] SRC... [USER@]HOST:DEST

    the command I run from my school server to my home backup machine is this

    rsync -avi --delete ~ me@homeserv:~/School/ >> BackupLog.txt

    This takes all of the files in my home directory (~) and uses rsync's archive mode (-a), verbosly (-v), lists all of the changes made (-i), while deleting any files that don't exist anymore (--delete) and puts the in the Folder /home/me/School/ on my remote server. All of the information it prints out (what was copied, what was deleted, etc.) is also appended to the file BackupLog.txt

    I know that's a whirlwind tour of rsync, but I hope it helps.

提交回复
热议问题