automate pull linux backup file to window server


Guys, there are always a very good question on “where are the backup file store?”. In the IT field, we know that it is not SAFE to store backup file inside the same disk storage.
Recently, I has a customer would like to pull their application backup file from a Window server.
Here is the solution after I done some research on it.


Manual Execution:

  • Download the PSCP.exe from Putty download page (
  • Open a Command Prompt and execute following command

    Command example:

    pscp.exe -pw password1 root@ "C:\."

    abc.log will be transfer to C:\ drive. (Do remember to add in the “.” behind the “C:\”. It is a MUST!)

    Now, let us combine all put it into a bat file to allow window scheduler can execute it base on the scheduled time.

  • Put the PSCP.exe into “C:\backup\”
  • Open a notepad and put following content into it, save it as “backup.bat” under “C:\backup\” (Remember to change all the user information)
  • pscp.exe -pw password1 root@ "C:\backup\."
  • Double click the “backup.bat” and check your result
  • If successful, using the Window schedule task function to execute the “backup.bat”
  • Leave a Reply