Home > OS >  Ask how to read a constant overwritten files
Ask how to read a constant overwritten files

Time:11-11

General situation: our project deployment of the system, a set of external company now needs to be in the system of real-time transaction log export to our own server for analysis, because the external company directly in their system deployment procedure is not recommended, so now can only through the way of SCP will log copy to our server,
Question: because of the need to real-time analysis, so the real-time demand is higher, SCP once a minute and cover the original file at a time, how to continuously read the export file content to analysis?
Supplement: 1. The other system of log is divided according to the hours, such as by 10 o 'clock, the log files will be renamed the a. a. 20200803-09, then generate a new file, how to guarantee the SCP content integrity?
2. Because the log directory is very big, and more than one type of log (I only need transaction log), so don't consider the entire directory SCP

CodePudding user response:

Suggest you see the rsync command

CodePudding user response:

Can log directory over NFS mount on its own system,
So you don't need to copy, deal directly with the log file a,
At the same time, to deal with a rename,
  • Related