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.
Similar Posts:
- Easy methods to Backup your Cpanel files
- How to do backups with Network Attached Storage (NAS) in Linux
- Preventing Brute Force Attacks on FTP server
- How to upload/download files with FTP in linux commandline
- Using Dig tool for DNS lookups and Nameserver query
- Important TCP/UDP Port Numbers
- USB or Network Port? Which is best for high speed internet?
- Install FTP Server for Centos/RHEL
- How to secure your DNS server
- Perl Net DNS Tutorial for Querying DNS Servers




