bioncooking.blogg.se

Tar compress and ssh to remote folder
Tar compress and ssh to remote folder






tar compress and ssh to remote folder
  1. #TAR COMPRESS AND SSH TO REMOTE FOLDER INSTALL#
  2. #TAR COMPRESS AND SSH TO REMOTE FOLDER ARCHIVE#

2 pkumar pkumar 90 Apr 7 00:25 /opt/backup/pkumarĪs we can see “pkumar” directory is created on destination folder and its contents are also copied. 1 root root 6153239 Apr 7 00:25 /opt/backup/OpenStack-Networking.pdfĭrwx. Let’s verify whether directory is copied or not, execute below command, ~]# ls -ld /opt/backup/*

tar compress and ssh to remote folder

Sent 4.09M bytes received 96 bytes 8.19M bytes/sec Let’s assume we want to copy or sync pkumar user’s home directory to /opt/backup folder, execute the below rsync command with options -zavh, ~]# rsync -zavh /home/pkumar /opt/backup

tar compress and ssh to remote folder

Example:2) Copy or Sync directory locally (rsync -zavh) In above we have used the options like -z for compression, -v for verbose output and -h for human readable output. Sent 4.09M bytes received 35 bytes 2.73M bytes/sec Let’s assume we want to copy a file from pkumar user’s home directory to /opt/back folder, execute the below rsync command ~]# rsync -zvh /home/pkumar/OpenStack-Networking.pdf /opt/backup Let’s jump into the useful examples of rsync command Example:1) Copy or Sync files locally (rsync -zvh) –progress show the sync progress during transfer.-h, –human-readable display the output numbers in a human-readable format.-z, –compress compress file data during the transfer.-e, –rsh=COMMAND mention the remote shell to use in rsync.-n, –dry-run perform a trial run without synchronization.-l, –links copy symlinks as symlinks during the sync.-u, –update don’t copy the files from source to destination if destination files are newer.-b, –backup take the backup during synchronization.-r, –recursive sync files and directories recursively.

#TAR COMPRESS AND SSH TO REMOTE FOLDER ARCHIVE#

  • -a, –archive archive files and directory while synchronizing ( -a equal to following options -rlptgoD).
  • Remote Sync Push: # rsync of the commonly used options in rsync command are listed below:

    #TAR COMPRESS AND SSH TO REMOTE FOLDER INSTALL#

    In Debian Like operating Systems (Ubuntu & Linux Mint) use below apt command to install rysnc tool, ~]# apt install rsync -y When we do minimal installation of CentOS & RHEL OS then rsync package is not part of default installation, so to install rsync on CentOS & RHEL, run the beneath yum command ~]# yum install rsync -y Rsync command is available for all UNIX and Linux like operating systems.








    Tar compress and ssh to remote folder