I am trying to copy the files modified from specific date to current date from Source server to target server with same directory structure. I have created the script for copying files from Source directory to target directory in same server. Now looking for 2 different Linux servers.
Source server: Source34.abc.net
Directory and files: /home/Amal/db/tmp/File1.txt, /home/Amal/db/work/File2.txt, /home/Amal/db/out.xml
Target Server: Target30.efg.net
Directory : /home/Amal/db/tmp/ /home/Amal/db/work/
Want to achieve:
- Sftp from source server to Target server
- Copy the files from source to Target with the same folder structure
NOTE: Source and Target will have same Directory structure
sftp
access to both servers? This could be easily accomplished withssh
access to both.rsync
as explained here: unix.stackexchange.com/questions/183504/…scp