Created
October 25, 2013 03:16
-
-
Save fasthold/7148964 to your computer and use it in GitHub Desktop.
使用 ScriptFTP 进行远程备份同步。这是 ScriptFTP所用的脚本
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The host, user name and password are stored in variables. | |
# Change the text between the quotes with your own settings. | |
$hostname="192.168.1.x" | |
$user="username" | |
$password="password" | |
# Variables are also used to store the local and remote path | |
# of the website. | |
$localwebfolder="D:\path\to\backup\folder" | |
$remotewebfolder="/remote/sub/foler" | |
# Connect to the FTP server. Variables are used as OPENHOST parameters. | |
OPENHOST($hostname,$user,$password) | |
MKDIR($remotewebfolder) | |
# Upload the new or modified files. Subdirectories are ignored. | |
SYNC($localwebfolder,$remotewebfolder,UPLOAD,SUBDIRS) | |
# Close the connection | |
CLOSEHOST |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment