• Rob's side project: I recently started Gun-Forums.com and we currently have a $100 raffle - if you're into guns, join up and enter the raffle to win $100.00. Gun Forums

Script to transfer backup from Hosting server to my synology server one account at a time.


New Member
Hi Linux pros,

I'm need to create a script and here's what it need to do:

1. SFTP to my Hosting Server (Linux) sftp [email protected]
2. Backup website accounts 1 at a time (This is due to server space).
3. Pull the backup to source server (Synology) and delete it in the hosting server after transfer.
4. Repeat step 1-3 until all accounts has been transferred successfully.

The script will be running from Task Scheduler in synology server.
Also I wonder if port forwarding is needed to do this?

Any help or direction would be appreciated.
Last edited:


Active Member
I believe rsync can do this, and perhaps one of its GUI versions. I use rsync to make backups, but nothing that complex. You could try looking through the rsync man page.


Active Member
Is the hosting server a Linux system? If you have proper permissions you could initiate the Linux script from anywhere, so the "from" location should not have to be your local machine. As I said, by rsync application is much simpler, but as I read the man page the from and to locations should be anywhere you have appropriate permissions.

Members online