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


 
Thread Tools Search this Thread
Top Forums UNIX for Beginners Questions & Answers Script to transfer backup from Hosting server to my synology server one account at a time.
# 1  
Old 02-21-2020
Script to transfer backup from Hosting server to my synology server one account at a time.

Hi Linux/Unix pros,

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

1. SFTP to my Hosting Server (Linux) sftp user@hostingserver.com
2. Backup website accounts 1 at a time (This is due to server space). This is the command to backup each cPanel account:
Code:
/usr/local/cpanel/scripts/pkgacct sentiments /home

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? I'm hoping not as my internet provider does not allow this.

Last edited by vbe; 02-21-2020 at 02:17 PM..
# 2  
Old 02-21-2020
What I dont understand is where is your Synology?
If it is at home, unless you pay to have a fix IP your provider will give you a dynamic and your lan at home is a private one
So if it is the case it will be a little bit more complex than what you described...
# 3  
Old 02-21-2020
Yeap it is at home. For static IP or port forwarding my ISP require me to opt for Business internet which is very expensive. Since I'm reaching out to the hosting server I was under the impression that I will not need the port forwarding. As a last resort I can still have the port forwarding arranged if required.

Last edited by humble_learner; 02-21-2020 at 02:41 PM..
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Transfer file from a server takes long time

It takes 6 hrs for a 90 GB zip file that i am copying / transferring from serverA onto serverB. scp user1@serverA:/opt/setup/cash.zip . Output: cash.zip 21% 19GB 4.7MB/s 4:11:46 ETA uname -a SunOS serverB 5.11 11.2 sun4v sparc sun4vCan you please suggest if i could do... (11 Replies)
Discussion started by: mohtashims
11 Replies

2. Shell Programming and Scripting

Transfer files from one server with bash script

Hello to all, I want to copy from one server to another files of last 24 hours with size between 500MB and 2GB. The code below searches last files in 24 hours. find . -mtime -1 In order to copy faster I'd like to compress the files before copying them. How to automate the process of... (8 Replies)
Discussion started by: Ophiuchus
8 Replies

3. Shell Programming and Scripting

Do I require remote login access to a windows server to transfer files from a UNIX server

Hi All I need to transfer a file from a UNIX server to a windows server. I saw that it is possible to do this using scp command by looking at the forum listed below: ... (2 Replies)
Discussion started by: vx04
2 Replies

4. Shell Programming and Scripting

Help with script to transfer files from one server to another

Hi I have the following script: #!/bin/sh set -x touch -mt 201210040000 /tmp/ref1 touch -mt 201210042359 /tmp/ref2 find /fs1/bscsrtx/BSCS_ix/WORK/LOG -type f \( -newer /tmp/ref1 -a ! -newer /tmp/ref2 \) > file_lst scp $(< file_lst) root@10.100.48.76:/ano2005/fs1_2015/LOG/ but somehow its... (7 Replies)
Discussion started by: fretagi
7 Replies

5. UNIX for Dummies Questions & Answers

Transfer file from server B to server C and running the script on server A

I have 3 servers A, B, C and server B is having some files in /u01/soa/ directory, these files i want to copy to server C, and i want to run the script from server A. Script(Server A) --> Files at Server B (Source server) --> Copy the files to Server C(Target Server). We dont have RSA key... (4 Replies)
Discussion started by: kiran_j
4 Replies

6. Shell Programming and Scripting

File transfer from one server to another server in unix

Hi, Can anyone help me. I am a new user in unix. I want to transfer (ftp) a file from one unix server to another server. Kindly help me. more details: server 1 file_name a.lst path: :/temp server 2 path : /develp/temp Thanks, Raj, (2 Replies)
Discussion started by: easterraj
2 Replies

7. Shell Programming and Scripting

Shell script to transfer the files from source to target server.

I need to write a shell script to transfer the files every hour from source - target server. The cron job should be running every hour and shouldn't copy already copied files to the remote server ? I was able to write intial script but not able to get the logic for (in the next run it should... (12 Replies)
Discussion started by: radhirk
12 Replies

8. Shell Programming and Scripting

Transfer file from local unix server to remote server

want to remove this thread. thanks (2 Replies)
Discussion started by: indira
2 Replies

9. HP-UX

Transfer file from local unix server to remote server

want to remove the thread thanks (2 Replies)
Discussion started by: indira
2 Replies
Login or Register to Ask a Question