How to compress and de-compress logs in Virtual Appliance?
03/26/2020 1041 11161
Sometimes we need to move syslogs from Virtual Appliance to localhost either to free up the disk space or let the summarizer work efficiently. In some cases when there are hundreds of gigabytes ( with either .src/.unp extention) of information in the syslogs folder summarizer get chocked up. Freeing up space makes the summarizer to work efficiently. Once summarizer is up to date addition syslogs can be moved to syslogs folder for processing.
Lets look at the current size of the archive logs: [root@mini8snwl syslogs]# du -h 194.5M ./archivedSyslogs (Current archived folder size is 194.5MB)
Compress the data using the following command. We can get a compression ratio ~15/20:1 from the actual disk space: [root@mini8snwl archivedSyslogs]# tar -cvzf syslogs.tar.gz *.prd - new file will be created which will be called as syslogs.tar.gz - In the above example we are compressing the .prd files.
After the compression lets get the folder size again: [root@mini8snwl syslogs]# du -h11.6M ./archivedSyslogs ( After the compression file size is now 11.6MB from the file size we can see the the compression ratio almost ~20:1.)
To unzip the files we can use the following command: tar -xzvf syslog.tar.gz We can use Winscp or Linux command line to move the compressed file to the local drive. This will take less time and disk space to move all the data.