Thursday
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.