PSMP: How to execute rsync

PSMP: How to execute rsync

87
Created On 11/10/26 11:02 AM - Last Modified 11/10/26 16:10 PM


Objective


Background: 
The UNIX rsync command is used to synchronize files across systems. The command uses SSH for this purpose. 

It is possible to leverage PSMP for proper session isolation and monitoring. Please find below the syntax for the rsync command (Source: https://www.linuxtechi.com/rsync-command-examples-linux/)
 

Syntax of rsync command:

Local Sync: # rsync {options} {Source} {Destination}

Remote Sync pull: # rsync {options}  <User_Name>@<Remote-Host>:<Source-File-Dir>  <Destination>

Remote Sync Push: # rsync  <Options>  <Source-Files-Dir>   <User_Name>@<Remote-Host>:<Destination>

Some of the commonly used options in rsync command are listed below:

  • -v, –verbose                             Verbose output
  • -q, –quiet                                  suppress message output
  • -a, –archive                              archive files and directory while synchronizing ( -a equal to following options -rlptgoD)
  • -r, –recursive                           sync files and directories recursively
  • -b, –backup                              take the backup during synchronization
  • -u, –update                              don’t copy the files from source to destination if destination files are newer
  • -l, –links                                   copy symlinks as symlinks during the sync
  • -n, –dry-run                             perform a trial run without synchronization
  • -e, –rsh=COMMAND            mention the remote shell to use in rsync
  • -z, –compress                          compress file data during the transfer
  • -h, –human-readable            display the output numbers in a human-readable format
  • –progress                                 show the sync progress during transfer

For more information on PSMP usage, please refer to the "Privileged Access Security End User Guide" (Versions up to v10.9) or https://docs.cyberark.com/Product-Doc/OnlineHelp/PAS/Latest/en/Content/Landing%20Pages/lp_PrivilegedAccountMain.htm (v10.10 and higher)


Environment


10.2;10.3;10.4;10.5;10.6;10.7;10.8;10.9;10.10

Procedure


To use the rsync command, we need to use one of the following examples:

1. rsync -av /home/test01/sync cyberark_user@cyberark_ssh@76.249.80.136@76.249.80.109:/home/cyberark_ssh/sync 
   Note: You can specify more than one "v" in the arguments for more verbose output
 
OR

2. ssh -t <vault user>@<target user>@<target host>@<psmp> rsync -av <directory> <vault user>@<remote target user>@<remote target host>@<psmp>:<target folder> 

Either option will produce the same result, although option (1) is more streamlined


Actions
  • Print
  • Copy Link

    https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA1hj0000001YaoCAE&lang=en_US&refURL=http%3A%2F%2Fknowledgebase.paloaltonetworks.com%2FKCSArticleDetail