[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 407
  • Last Modified:

Automatically zip Blackberry Server logs

Is there a way to automatically zip the daily folder for Blackberry Logs, and then have it remove that folder after its zipped?

0
Rhodan
Asked:
Rhodan
  • 6
  • 4
1 Solution
 
nappy_dCommented:
You will need the WinZip an the command line zip utility. To do this
0
 
nappy_dCommented:
using compress.exe from the resource kit, you can create batch script and create a scheduled task.
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 
RhodanAuthor Commented:
Yes I have 7zip, and the resource kit, but I was wanting something along the lines of a script etc. Someone must have one to share?
0
 
RhodanAuthor Commented:
How would I go about removing the older daily log folders if I had to use the compress option?
0
 
RhodanAuthor Commented:
I have thought of using forfiles and robocopy, any idea's / advice?
0
 
nappy_dCommented:
Answer the questions below and i will help you make a script to run.

OK what is the path to your BES server logs?  

Do to want the logs to contain a date?  

Where do you want the files to be saved after being zipped?
0
 
RhodanAuthor Commented:
They are in the default location, c:\program files\research in motion\blackberry enterprise server\logs.

Each day there's a folder created by BES, in this format: YYYYMMDD. I want the zip file to be in that format and to be zipped to another location, such as D:\Archived BES Logs.

I then want the original folder deleted.

I would scheduled this to run every week for instance, so it would need to zip and remove the oldest last 5 days for example.

Is something like that possible?
0
 
RhodanAuthor Commented:
Alternatively, if I could just get something that I can run once a week with a scheduled task that will:

1. Zip each daily folder using the existing folder name, ie. YYYYMMDD
2. After zipping them, delete the folder that was zipped.

I'll then use robocopy to move the zipped files to another location.

Cheers
0
 
RhodanAuthor Commented:
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 6
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now