`rsync` - experienced advice, please

You might want to look at these:




For usage of rsync, I can only offer up references posted regarding my own usage and coding for rsync-based backups. In my case, I have logic to perform that as independent jobs on each of the partitions on my 2 TB drive (each partition about 300 GB).

Note that the posting has a full English translation at the bottom of the posting, after the code listings. :slight_smile:

LOG of backup session:

root@OasisMega1:/Oasis/bin# quickRSYNC.sh

	 NOTE:   This script will ONLY perform synchronization backup (applying differences).
		 It does NOT perform a FULL COPY backup.

		 For FULL COPY backup, use 'OS_Admin__partitionSecondary_Mirror.sh' responding 'y' at the appropriate prompt ...


	 Forcing backup of all files.       Option '--keepNewer' is available to keep backup version of files if newer ...

	 Checksum comparisons is disabled.  Option '--compareFileData' is available to force this check by rsync ...

	 Following block devices have been identified:

		 sda      8:0    0   1.8T  0 disk 
		 sdb      8:16   0 465.8G  0 disk 
		 sdc      8:32   0   3.6T  0 disk 
		 sr0     11:0    1  1024M  0 rom  

	 External BACKUP disk is online ...

 ==============================================================================================
 ==================================  PARTITION BACKUP START  ==================================
 ==============================================================================================

	 SOURCE=               /DB001_F1
	 MIRROR= /site/DB005_F8/DB001_F1 ...

	 Proceed with backup of 'DB001_F1' ? [y|N] => 
		 'DB001_F1' skipped ...

 ==============================================================================================
 ==================================  PARTITION BACKUP START  ==================================
 ==============================================================================================

	 SOURCE=               /DB001_F2
	 MIRROR= /site/DB005_F2/DB001_F2 ...

	 Proceed with backup of 'DB001_F2' ? [y|N] => 
		 'DB001_F2' skipped ...

 ==============================================================================================
 ==================================  PARTITION BACKUP START  ==================================
 ==============================================================================================

	 SOURCE=               /DB001_F3
	 MIRROR= /site/DB005_F3/DB001_F3 ...

	 Proceed with backup of 'DB001_F3' ? [y|N] => 
		 'DB001_F3' skipped ...

 ==============================================================================================
 ==================================  PARTITION BACKUP START  ==================================
 ==============================================================================================

	 SOURCE=               /DB001_F4
	 MIRROR= /site/DB005_F4/DB001_F4 ...

	 Proceed with backup of 'DB001_F4' ? [y|N] => y



 Using previously determined bandwidth limit for rsync buffer setting ...

 Will apply parameter to limit flooding of I/O, memory and swap ==>>  --bwlimit=65536

	 Mon 20 Jan 2025 06:54:07 PM EST |rsync| Start DB001_F4 ...
	 Background 'rsync' working ...


 Expected Log files:
	 /site/DB005_F4/Z_backup.DB001_F4.DateSize.out
	 /site/DB005_F4/Z_backup.DB001_F4.DateSize.err


 Use 'OS_Admin__partitionMirror_Monitor.sh' to monitor rsync process.


 Imported LIBRARY:  INCLUDES__TerminalEscape_SGR.bh ...


	 Mon 20 Jan 2025 06:54:17 PM EST

	 PID 19287 is RSYNC child process ...
	 PID 19286 is RSYNC child process ...
	 PID 19285 is RSYNC MASTER process ...
	 RSYNC backup process under way ...

	 root       19285   19281  0 18:54 pts/0    00:00:00 rsync 
				--bwlimit=65536 
				--one-file-system 
				--recursive 
				--outbuf=Line 
				--links 
				--perms 
				--times 
				--group 
				--owner 
				--devices 
				--specials 
				--verbose 
				--out-format=%t|%i|%M|%b|%f| 
				--delete-during 
				--whole-file 
				--human-readable 
				--protect-args 
				--ignore-errors 
				--msgs2stderr ./ /site/DB005_F4/DB001_F4/


	 Scanning at 10 second intervals ...
	 ...............

	 RSYNC process (# 19285) has completed.

	 Mon 20 Jan 2025 06:56:50 PM EST

root@OasisMega1:/Oasis/bin# 

Images of tail end of log with code-driven colouring:


5 Likes