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 email@example.com:destination_file
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]
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.
- 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
- How to run FTP server on different port!
- Install FTP Server for Centos/RHEL
- How to secure your DNS server
- Install LAMP Server for Centos/RHEL