Paste this into a .bat-file:
echo on
Set CURRENTDATE='%date%-%time%'
Set REMOTESERVER=server
Set REMOTEPATH=/home/user/rsyncbackup
Set LOCALPATH=/cygdrive/e/Documents
rsync -azP --delete --link-dest=%REMOTEPATH%/current %LOCALPATH% %REMOTESERVER%:%REMOTEPATH%/%CURRENTDATE%
ssh %REMOTESERVER% "rm %REMOTEPATH%/current && ln -s %CURRENTDATE% %REMOTEPATH%/current"
PAUSE
Change the REMOTEPATH and LOCALPATH to something that suits you. Once correctly set up you can remove the PAUSE and state "echo off" to silently run this at set intervals.
No comments:
Post a Comment