Link to home
Start Free TrialLog in
Avatar of j4piper
j4piper

asked on

Automating File Compression in as a scheduled task - (command line script) --- Windows 2000

I have a customized SQL database that does a nightly backup to a backup folder.

The file naming structure embeds the date and time into the file name.  Example: oasis_db_200409282000.bak

My backup database file size exceeds 4GB.

I am needing to compress this file so that I can manange it with my tape backup.

I have tried using gzip to compress the file.  This works great and reduces the file to 750MB.....perfect size.

My problem is I don't know how I can accomodate the changing file name.  gzip doesn't allow wildcards.

I am running Windows 2000 Server where my database is located.

Is there another way/method to accomodate this task?

Thanks.
Avatar of rhandels
rhandels
Flag of Netherlands image

Hi,

You can set up compression on the folder where the .bak file is placed, to do so, right click on the designated folder, then on the general tab, choose Advanced. On the advanced tab, check the  "Compress data to free up space".. Don't really know how much it will safe ya..
ASKER CERTIFIED SOLUTION
Avatar of David Lee
David Lee
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of j4piper
j4piper

ASKER

I will give this a try in the next day or two.  My actual data path is in d:\sql_backups.  The gzip command line goes like this;

gzip -c filename.bak > filename.gz

Thanks a million.