Whenever we receive a hint or tip from IP offices concerning any of the PCT EDI software or services, we publish it for the use of others.
Using lftp to Automatically Synchronize Servers
This hint was submitted by IP Australia. It describes the lftp commands used to automatically synchronize the local directories (i.e. on a machine at the national office) with the Office directories in the PCT EDI server. When this command is executed (at regular, timed intervals; another feature of lftp) new contents of the Office local directory will be uploaded to the PCT EDI machine and new contents in the Office PCT EDI directories will be downloaded to the local machine.
Assuming your private key and account name environment is properly set up, simply enter the following command:
lftp -c 'open sftp://pctftp.wipo.int && mirror /download .'
This will mirror the contents of the "download" directory under the Office PCT EDI account with the current local directory (as specified by the '.'). With a few simple changes, lftp can be left to run in the background, executing the 'mirror /download .' on a regular, timed basis (for example, once a day) along with other "mirror" commands to mirror XML requests up to the PCT EDI machine.