Home > OS >  Linux backup log and delete log script encounter problems
Linux backup log and delete log script encounter problems

Time:09-30

To compress/log/log directory: 20171027. Tar. Gz, particularly if the log directory file, packaged compressed need 10 s, after 10 s of the log file to delete, but there are some log files within 10 s new log, will be lost after deletion log within 10 s, is there any way to avoid journal within 10 s lost or will also packaged in 20171027. The tar. In gz, thank you

CodePudding user response:

Same as above, there are a great god to solve?

CodePudding user response:

If you encounter this problem, information on the production log directory and the log file name rule design has a problem, generally speaking, a log to keep more than seven days, even one day especially large amount of log, lead to the storage space is full, should also start with the hardware, spend up storage, and should not delete the log, further, even if the log volume reached the point where they have to delete, also should consider to remove the date the former log, if the log scale is huge, so log should be maintained points multiple files, delete the time of the file,

CodePudding user response:

Production log basic it is to save more than 90 days (except the day's other compressed package in the form of reserves, but the packaging is today packing yesterday, not today packaged today, if today must be packaged today, the first cutting logging, then pack, if must be packaged today, and is not to cut, that is the rules you have a problem)
  • Related