Files, Folders, Sub folders from system1 are successfully copying to system2 using below command
rsync -avzP -u -v -e ssh /opt/lampp/htdocs/files/* demo@192.168.157.130:~/files_backup
I need to compress the whole folder "files" during copying. It means I need only compressed file
Any help will be highly appreciable
Regards
11 Answer
rsync is using compression during the transfert, if you are not doing differential backups, you can use tar to compress before and scp to transfert the compressed files directory.
cd /opt/lampp/htdocs/files/
tar czvf ../files.backup.tar.gz .
cd ..
scp /opt/lampp/htdocs/files.backup.tar.gz demo@192.168.157.130:~/files_backup 0