HealthLinks is your destination for reliable, understandable, and credible health information and expert advice that always keeps why you came to us in mind.

How to Use Rsync to Backup Windows

104 7

    Backup Your System

    • 1). Download cygwin onto your Windows system. Cygwin will create an environment that mimics a Linux system on the Windows computer so Rsync can run. In Cygwin select "+editors" and chose "nano" from the menu. Click on "+Net" and highlight "Rsync". Then click on "+Admin" and select "cygrunsrv". These are the minimum selections needed to run Rsync on Windows.

    • 2). Tell the Windows system where the Cygwin directory is located, otherwise problems will arise. Add a path statement in the Environment Variables screen. Go into Control Panel, Advanced Tab, Environmental Variables and PATH statement. Add ";C:\Cygwin\bin" to the end of the current statement. Close the Environmental Variables box. Remember to include the semicolon before adding the new path.

    • 3). Back up the Windows machine by creating a batch file. In this case the batch file will be called secret. The basics of the code include the pathway to the rsync.exe file, C:\Cygwin\bin\rsync, the verbose, vrtz, that lets you know the system has been copied, the path to your new secret file, c:\cygwin\secret, and the user name or IP address for the destination of the backup, an example being host@computer2.com: : modulename. An IP address is used when the backup is being placed on another computer. The entire code for this sequence is below.

      @cls

      @echo off

      rem Rsync job control file

      C:\Cygwin\bin\rsync -vrtz --c:cygwin\secret host@computer2.com::modulename

    • 4). Delete any files in the backup that have been deleted from your system by inserting another command after the --c:cygwin\secret. Simply add "--delete" and then the path to the files. This will delete these files locally. Be careful that the path is correct as you can accidentally delete files with the wrong path name.

Source...

Leave A Reply

Your email address will not be published.