Remote Copying Tools , Backup & Archive In Linux

Remote Copying Tools , Backup & Archive In Linux

It is a command-line application that lets users to securely copy files and directories between two places, often Unix or Linux systems.
The protocol ensures that file transmission is encrypted, preventing anyone with malicious intent from obtaining important information.

  1. SCP :
    The scp (secure copy) command in the Linux operating system is used to securely copy files across servers.
    The SCP command, often known as secure copy, enables the secure transmission of files between a local host and a remote computer, or between two remote hosts.
    It employs the same authentication and security methods as the Secure Shell (SSH) protocol.
    SCP is well-known for its ease of use, security, and pre-installed functionality.
    Syntax :

     #scp <FileName> <remoteuser>@<remoteserver>:<LocationToCopy>
     scp Test.txt student@Server12:/root/data/
    
  2. RSYNC :
    RSYNC, or remote synchronization, is a Unix-like system software program that efficiently syncs files and directories between two hosts or workstations.
    One is the source or local host from which the files will be synchronized, and the other is the remote host where the synchronization will take place.
    Rsync is well-known for its delta-transfer method, which replicates only the differences between the source files on the local host and the existing files on the remote host.
    Syntax :

     #rsync <filename> <remoteuser>@<remoteserver>:<LocationToCopy>
     # -a --> Archive -v --> Verbos
     rsync -av Test.txt student@Server12:/root/data/
    
  3. SFTP
    Sftp is the command-line interface for accessing the SFTP secure file transfer protocol on Unix-like operating systems. It is a secure variant of FTP. It securely sends files via a network connection.
    Syntax :

     #sftp <username>@<servername>
     sftp Student@Server12
    

Compression Tools :

Utility software includes compression tools. Furthermore, we can use these programs to compress and decompress files.
Storage space is a crucial component of a computer, and it is critical to keep this storage in good condition.
As a result, we use compression techniques to compress large files and reduce their size.

  1. ZIP

     #Compress 
     #zip <filename>
     zip test
     #Decompree
     #unzip <filename>
     unzip test.zip
    
  2. GZIP

     #Compress 
     gzip test
     #Decompree
     gunzip test.gzip
    
  3. BZIP2

     #Compress
     bzip2 test
     #Decompree
     bunzip2 test.bz2
    
  4. XZ

     #Compress 
     xz test
     #Decompree
     unxz test.xz
    

    Backup and Archive Methods In Linux :

    It compresses files and directories into a tarball, which is an archive file.
    The "tar" command is one of the most commonly used for this purpose.
    Furthermore, the tarball is easily transferable from one server to the next.

    How to create an archive the file?

     #tar -cvf <Destination.tar> <SourceDirectory>
     tart -cvf MyLogsBackup.tar /var/logs/
    

    How to extract an archive the file?

     #tar -xvf <Destination.tar> <SourceDirectory>
     tart -xvf MyLogsBackup.tar /var/logs/