Transfer backup files from server to server in command line!

Linux/Unix Add comments

i have been struggling to find some way or another to transfer my file from one linux server to another using commandline. Before this i was just using cpanel to do backups.

Here is an easy way to accomplish transferring backup files from one server to another in linux. Just simple command using SCP (secure file copy)

scp -C -P portnumber local_filename root@your.ip.address:destination_file

Example:
scp -C -P 2929 backups.tar.gz root@IP.ADDRESS:/home/backups/

-C is compression to speed up transfer.
-r is for recursive
-P is your SSH port number (default ssh port 22)
[If you are running SSH other than default port you will need to specify this]

NOTE:
Dont forget that if you are running a firewall (CSF or APF) make sure that your unblock port in your EG_TCP_PORT (outbound TCP port) in your local host.

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • BlinkList
  • blogmarks
  • del.icio.us
  • digg
  • feedmelinks
  • Furl
  • Fleck
  • MyShare
  • NewsVine
  • Netscape
  • Slashdot
  • Spurl
  • StumbleUpon
  • Taggly
  • Technorati
  • Wists
  • YahooMyWeb

Leave a Reply

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Login