Search code examples
linuxredhatrsyncmainframelftp

using lftp or rsync on zlinux


quick question - can lftp or rsync be used on z/linux for file mirroring with subfolders, and if so what are the limitations? Which would you recommend?

If not, what are some alternatives? I need to keep two folder-structures mirrored across sites (i.e. a two-way sync), by scripting (or configuring) something to either automatically check for changes and update, or do it regularly with a cron job.

note: I wanted to tag this "zlinux" but it doesn't exist and I don't have the rep to create it


Solution

  • lftp and rsync can't be used for strict two-way mirroring, as this involves keeping a history between syncs. They can, however, be used for one-way mirroring; and have many options to do so.

    They can both be installed and run on z/linux (at least, redhat enterprise 6.2).

    If sftp/ssh is an option, use rsync as it is quicker (due to only sending parts of files, if that's all that's required). rsync requires a daemon to be running if the password is to be sent with a passwordfile (as opposed to using ssh keys or typing it each time); so that is a limitation of rsync.

    lftp can have the password scripted; and can also use ssh (sftp) although it is more complicated to do so.

    lftp is recursive by default (but can be made not to be); rsync needs to be told to act recursively