I need to backup some important data from local folder and transfer it to remote machine - worker01
so I think to tar the local folder and send the tar to remote machine as the following
tar zcvf - /hadoop/hdfs/journal/hdfsha/current | ssh root@worker01 "cat > /home/master01.journal.tar.gz"
but other approach can be also with rsync as
mkdir -p /home/bck_master01.journal ( on remote machine ) rsync -a /hadoop/hdfs/journal/hdfsha/current root@worker01:/home/bck_master01.journal
so because we are dealing with very sensitive data , I am wondering what is the preferred approach?