I'm trying to maintain a replica copy of the File system on another machine for a cold standby.
To to the first copy of the entire system I ran an rsync job with the below command.
rsync -avlP root@master:/data/App1/* /data/app2_testing
This completed successfully without any errors or issue. I was able to start the application as well and was able to use it efficiently.
Ran a second run and that also completed as expected but the only difference being the file system size now in the master was 10 GB but on the Slave machine is 11 GB.
As per rsync it should only copy the modified files but strangely the filesystem size has increased.
Went through a few documentation and links still seeing the same behavior:
rsync -hvrPt root@master:/data/App1/* /data/app2_testing
What should be the right procedure to do the rsync so it only copies changed files and not increase the space on the slave machine??
--sparsewithrsync) Are you syncing hard-linked files? (In that case, use-Hwithrsync) The effect of the-loptin is included in-a, so if you use-ayou don't need-l. Why do you use/data/App1/*and not just/data/App1/as the source? – Kusalananda Apr 21 '21 at 15:46--deleteis useful if files are deleted in the source dir and you want them deleted from the destination too. – cas Apr 21 '21 at 15:49Source
[root@awsmblx108as002 ~]# df -T /data/ Filesystem Type 1K-blocks Used Available Use% Mounted on /dev/mapper/vgdata-lvdata ext4 2103428672 1161660696 856263476 58% /data
Destination:
df -T /data/ Filesystem Type 1K-blocks Used Available Use% Mounted on /dev/mapper/vgdata-lvdata ext4 1388064072 1156443028 170474152 88% /data
– anish anil Apr 21 '21 at 17:11dfoutput to the question and format it properly. The way it looks now it's not readable. – berndbausch Apr 23 '21 at 01:50