Get the App
SLTechnology News&Howtos  ›  Servers  › 

Windows and Linux use WinSCP scripts (backups) to automatically synchronize data

Shulou Source: shulou.com Published: 2022-06-02 20:28:23 09月22日 Update

Automatic data synchronization using WinSCP scripts (backups)

Write at the front:

This note applies to data backup between windows and linux.

Use the following script if windows has installed the WinSCP program

Script file script.txt

Option echo off

Option transfer binary

Open s ftp://username:password@ip:port

:: cd / backup/

:: put E:\ app (simple upload file command)

Synchronize remote E:\ app\ back / backup/back (synchronization command, compare file information, incremental synchronization)

Exit calls script file run.bat

@ echo off

Cd C:\ Program Files (x86)\ WinSCP

C:

Winscp / script=script.txt / ini=WinSCP.ini / log=log.txt is put into scheduled task execution

Put run.bat into the scheduled task and execute it according to business time.

Tags: Scripts files synchronization backups data tasks commands business between information premises increments data backup time programs notes Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Huawei Redmi Shulou Technology Linux Shulou Tech Info