1-855-888-4387 (Toll Free) 1-416-532-4387 (Intl)

WinSCP Backup Script Tutorial

Utilize this WinSCP backup script to protect your files using an automated process that helps ensure the integrity and safety of your files. In this tutorial, learn how to use WinSCP in collaboration with WebDrive to automate file backups with HostedFTP. To back up your files, you’ll need 3 requirements:

  1. WinSCP (free)
  2. WebDrive
  3. A HostedFTP group account or higher.


To setup the WinSCP backup script, follow the instructions below:

Setup your account for backing up files:

  1. Go to the Users Tab and click “Add username” located on the right hand menu.
  2. Create a backup user. Fill in the login credentials and save once complete.
    Make sure not to give the user a storage or bandwidth quota.
  3. Next, click “Login” beside the user’s username and use your admin password to login.
  4. Go to the Files Tab and create a backup folder in the root directory i.e “/”
  5. Share the new folder with any users you want to give access to the backup folders (optional).

Remember this backup user’s login credentials and folder name.

Setup WebDrive for backing up files:

  1. Connect to your backup user account using the login credentials in the previous step.
  2. Take note of the mounted drive i.e Drive A:
  3. Take note of the folder name i.e backup

Setup WinSCP for backing up files:

  1. In the site manager, input your login credentials for your admin account, or as the user who’s files you want to back up.
  2. Click save and change the site name to something you will remember (optional).
  3. Check “Save password”.
  4. Review your remote site. Make sure all files and folders you want to backup are located inside one directory.
    To specify a specific directory, take note of the folder path i.e mainfolder/subfolder1

Create a script to back up files part 1:

  1. Locate the Notepad program. Right click the program and select “Run as administrator”.
  2. Insert the following script: winscp.exe /console /script=script.txt
  3. Save the file using the following settings: Save as type: All Files and File name: script.BAT

Create a script to back up files part 2:

  1. Once again, locate the Notepad program. Right click the program and select “Run as administrator”.
  2. Insert the following script but using your own credentials where necessary:
    open adminlogin(a)
    mget -neweronly /MainFolder(b) A:\backup(c)
    a: the name of the site connection you created in WinSCP
    b: WinSCP folder path of the folder you want to backup
    c: WebDrive backup folder path including the mounted drive
  3. Save the file as: script.txt

Create a script for backing up files part 3:

  1. Locate and open the program folder for WinSCP.
  2. Click and drag both files into the WinSCP folder.
  3. Double click script.bat to run the script.

You can use window’s task scheduler to set a time for when you want the script to run.

NOTE: If you change folder names with this setup, all files, folders and sub-folders will be downloaded and uploaded into the new folder name. Personal accounts do not support automation.

Click Here for more Videos and Tutorials

Getting Started
Signing up for a Free Trial
Basic steps to Setup
Purchasing your account
Choosing the right account type: Enterprise and SMB
Logging into your account
Logging in with a Web Browser
Logging in with an FTP/FTPS/SFTP Client
Logging in by FTP URL with Username and Password
Reset and change your password
Administrator Initial Setup
Audit logs for logins and file transfers
Enable audit logs for login and file transfers
Accessing and viewing your audit logs
Branding
Adding branding to your account
Branding Contact Logins
DNS Configuration for faster transfer speeds
Web Interface
Home Tab
Files Tab
Contacts Tab
Users Tab
Plugin Tab
Setup Tab
Adding a User or Contact
Adding a Contact by Email Address
Add a User by Email Address
Add a User by Username
Using Groups
Administrator Access to User Accounts
Mail
Creating A Public Link
Sending and receiving files by secure email link
Creating contact lists for bulk emailing
HostedFTP email notification IP addresses
Account setup PDF Guides (*.pdf)
Shared Folders
Restricted Shared Folders
Configuring for Restricted Shared Folders (FUSN)
Creating Restricted Shared Folders
Creating Folder Structures for Sharing
Detailed Steps to Sharing Files/Folders
Managing Shared Folder Privileges
Add real-time notifications to uploads/downloads
Anonymous Access
Creating A Public Link
Anonymously Sharing Files by URL
Sharing folders and files anonymously
Transferring Files
Uploading Files by Web Browser (Max 2GB)
Uploading Files by FTP Client (Up to Max File Size)
Download your FTP/SFTP server files from any browser
Download files with an FTP client
Website Plugin
Web Plugin Overview and Guide
Plugin Brand Customization
Embed the Plugin into Your Website
Adding Additional Security (CAPTCHA, Password)
Security and Compliance Info
Security Model Overview
Security Model Details
MFA (Multi-Factor Authentication)
Add IP whitelisting
Enabling a Password Policy
Certificate & Host Key Info
SSL Certificate Info
SSL Server Test
FTPS Host Keys
SFTP (RSA/DSA) Host Keys
Configuring PKI Support
Compliance Info
GDPR
WCAG 2.0
SOC2
CJIS
PCI
HIPAA
Bundle Features
Group, Enterprise, T2, T5 bundle features
Different user types and function comparisons
Difference between users and contacts
Drag & Drop
Using drag and drop to send multiple files and folders
Drag and drop to upload multiple files and folders
Account Management
Purchasing your account
Payments & Billing
Choosing a payment plan
Renewing an expired account
Changing a Payment Plan
Changing credit card information
Reviewing billing statements
Trial Account Limits
Activated Account Limits
How is Storage Calculated?
Reviewing Account Storage Usage
Switching Account Bundles
Changing the Account Administrator
Cancelling an Account
FTP/FTPS/SFTP Connections
Hosted~FTP~ IP Addresses
Connect with Open FTP
Connect with Secure FTPS/SFTP
Connecting with an FTP Client
FTP vs FTPS vs SFTP
Command Line (CLI)
How to connect to your remote site using the command line
Understanding FTP commands in the command line
Connecting through SFTP by Command Line (CMD)
Using PKI keys to connect to Hosted~FTP~ on linux
Importing PuttyGen PKI Keys to Linux
FTP/FTPeS command line error codes and their meaning
Windows Explorer
How to setup an FTP server with Windows Explorer
Setting up Windows Explorer FTP on Windows 8
MAC
Connecting from a Mac Computer Terminal
FileZilla
Using Filezilla with FTP/FTPS
Using FileZilla with SFTP
WebDrive
Connecting to WebDrive
Using WebDrive
WinSCP
Installing WinSCP
Backup Scripts with WinSCP
Uploading & Downloading with WinSCP
AndFTP
Uploading & Downloading with AndFTP
Searching, Resume Support & Third-party Sharing with AndFTP
Industry Use cases
Accounting
Architecture
Call Center
Construction
Education
Engineering
Finance
Healthcare
Insurance
Legal
Real Estate
Manufacturing
Best Practices
Use Cases
Exporting EDI files to FTP for download
User Optimization
Create a Managed User
Giving a User Read-only Access
Giving a User Full Access
Default FTP Folder Destination
Set a 0GB Storage Quota
Importing Multiple Users & Shared Folders
Importing user and shared folders
Import templates for users and shared folders
Force Secure FTPS/SFTP Connection on Users
Combine multiple audit logs
Managing FTP Files and Storage in your Account
Moving Files from a User to an Administrator
Video Tutorials
QuickStart
FUSN
Branding
Web Interface
Home Tab
Files Tab
Web Plugin
AndFTP
AndFTP – Connecting, uploading and downloading
AndFTP – Searching, resume support and third-party sharing
WinSCP
WinSCP – Downloading, Installing and Understanding
WinSCP – Connecting with FTP, FTPS, SFTP, uploading and downloading
WinSCP Backup Script
CyberDuck
Cyberduck– Connecting with FTP,FTPS, SFTP, Uploading and Downloading
Cyberduck– Quick Look, Transfer Queue and Synchronizing
Cyberduck – Bookmarks, Editing and using Multiple Connections
FileZilla
FileZilla -Downloading, Installing and Understanding FileZilla
FileZilla – Connecting with FTP, FTPS, SFTP and uploading and downloading
FileZilla – Importing/Exporting Site Connections, Editing and Logs
FileZilla Tools – Bookmarking, Searching, using Multiple Connections
Our FTP Client Reviews
Desktop FTP Client Summary
Mobile FTP Client Summary
PSFTP Review : Our Rating 7.5/10
NetDrive Review: Our Rating 8.5/10
FireFTP Review : Our Rating 7/10
Filezilla Review: Our Rating 9/10
AndFTP Review:Our Rating 7.8/10
ES File Manager Review: Our Rating 5/10
FTP Ready Review:Our Rating 5/10
FTP On The Go Review:Our Rating 8/10
CyberDuck Review: Our Rating 9/10
Classic FTP Review: Our Rating 8/10
WebDrive Review: Our Rating 9.5/10
Fling FTP Review: Our Rating 9/10
SmartFTP Review: Our Rating 7/10
MultCloud Review: Our Rating 10/10
Troubleshooting
Error: QUOTA_USER_STORAGE or QUOTA_USER_BANDWIDTH
FTP/FTPeS command line error codes and their meaning
Troubleshooting FTP in the command line and common errors.
No matching host key found
Storage Quota Notification: Remedial action
Troubleshooting FTP in the command line and common errors.
Troubleshooting "Can't verify publisher"
Troubleshooting Drag and Drop
Drag and Drop Troubleshooting for Mac
Troubleshooting FTP/SFTP client connection problems
Troubleshooting slow upload speeds on Windows
No matching host key found
File not visible to admin
File uploaded successfully but not visible in account
Usernames – Guidelines and Restrictions
Release Notes
New Release Communique
Schedule Maintenance Overview
Contact Sales & Support
Bitnami