LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-31-2017, 02:49 AM   #1
kohshan99
Member
 
Registered: Sep 2012
Posts: 71

Rep: Reputation: Disabled
Question Files Transfer Between 2 servers


I've some servers in remote location. everytime I've to transfer files manually. I need small script to do it automatically every midnight.

basically my main concern is to transfer files to other server. both are remote location.
 
Old 07-31-2017, 02:55 AM   #2
TheEzekielProject
Member
 
Registered: Dec 2016
Distribution: arch
Posts: 664

Rep: Reputation: 190Reputation: 190
http://lmgtfy.com/?iie=1&q=Files+Tra...ween+2+servers
 
Old 07-31-2017, 03:12 AM   #3
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 1,861

Rep: Reputation: 338Reputation: 338Reputation: 338Reputation: 338
I think as long as you have the proper access and configured properly it can be automated.

Just open the ports of course that are needed for this setup.

Check out links below:
Rsync (Remote Sync): 10 Practical Examples of Rsync Command in ...
https://www.tecmint.com/rsync-local-...tion-commands/

https://serverfault.com/questions/14...ding-for-rsync

Or try searching: "scp remote copy"

Last edited by JJJCR; 07-31-2017 at 03:14 AM. Reason: edit
 
Old 07-31-2017, 03:18 AM   #4
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 5,679
Blog Entries: 3

Rep: Reputation: 2919Reputation: 2919Reputation: 2919Reputation: 2919Reputation: 2919Reputation: 2919Reputation: 2919Reputation: 2919Reputation: 2919Reputation: 2919Reputation: 2919
I'd also recommend rsync for the transfers. Since it runs over SSH it can be set to use keys for authentication. That also allows the exact rsync parameters to be locked down as part of the key itself.

Steps:
  • test manual rsync transfer
  • test manual SSH connection with keys
  • test manual rsync transfer with keys
  • lock down public key with command="..."
  • add to cron job or incron job
 
2 members found this post helpful.
  


Reply

Tags
cronjob, file manager, ftp, transfer


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: How to Securely Transfer Files Between Servers with scp LXer Syndicated Linux News 0 03-01-2017 07:33 AM
using Bittorrent to transfer data between servers? Amr_not_Amr Linux - Server 8 11-16-2008 12:26 PM
how to transfer a file between 2 servers graziano1968 Linux - Server 15 08-14-2008 03:34 AM
Quick way to transfer files using modems without servers detly Linux - Networking 3 07-07-2005 11:17 PM
Transfer Servers biggdady6998 Linux - General 3 10-02-2003 05:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:27 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration