I have a backup job that when I run, it creates partial backup files one after the other in an interval of say 20- 30 mins per file. It will create for example file bak1, then after some time, it will create the second file, bak2 and so on until it completes . The last file could be bak8 or bak30 depending on the size of the backup image. In total it may take up to 5 hours to complete splitting all the files for say a 3TB backup image. I don't want to wait for 5 hours for all the files to split before I rsync the files to a remote server where I have to do a restore.
What I plan to do is after the bak1 has completed splitting, my script will check if the createtime or modified time of the files is more 5 mins. This way I know for sure the split is completed, then I will use rsync the file from hostA to hostB: 'nohup rsync -a bak1 user@hostb:/backups/ &' to start sending the files to hostb, the script will sleep and loop again to do the check for bak2 and so forth up to the last split file, bakn and until the backup process has completed or pid gone.
I want someone with scripting experience in AIX to automate this process. This should be just about a few lines of code and should take less than an hour if you know your stuff.
If you want to test that your script is working, you use the AIX 'split' command for any big file you have . It will mimic the same process I am describing. ( split -b 1024m "yourbigfile" )