473,461 Members | 1,794 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How to compress backup files and delete old backups?

dear friends,

i wrote a job to backup my server
but because of my hard disk limittition i want to write another job to compress my bak files and delete files that are older than 20 days .

my first job is :

Expand|Select|Wrap|Line Numbers
  1. declare @path nvarchar(1000) 
  2. set @path='D:\MySolution\data\BackUp\Auto\mainserver_'+convert(nvarchar(10),getdate(),112)+'.bak'
  3. BACKUP DATABASE [mainserver] TO  DISK =@path  WITH  INIT
  4.  
please help me
Nov 29 '10 #1
1 2199
ck9663
2,878 Expert 2GB
You're going to need to have an archiving/compressing software for that (winrar, winzip, etc..). You're going to need the Command Line add-in/support for that software and call it from sql server.

Good Luck!!!

~~ CK
Nov 29 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Laphan | last post by:
Hi All Has anybody got any pointers or examples on how I can create a VB app to connect to a remote MySQL server at a set time and backup a remote db to local file? Although a lot of the...
4
by: Shyguy | last post by:
I have a database that backs up critical tables to a database, named Backup with the date, daily. I can't figure out how to delete these databases programmatically, say when they are 5 days old or...
1
by: Amy L. | last post by:
I have a project that is deployed using a MSI. When the user attempts to install a new version of the program I require them to remove the existing version first. Is it possible to do the...
1
by: Matt | last post by:
I have taken a backup of a production database and copied it to a test server. I'm attempting to use the Control Center to create the database from the backup. However, when I get to the screen...
9
bhing
by: bhing | last post by:
hiya everyone!!! i would like to know if theres a third party software or some configuration in order to backup some files from fedora 5 to red hat 9.. they are in separate computer. And i would...
1
by: =?Utf-8?B?U2NobWVuZ3k2OQ==?= | last post by:
Hopefully someone can help with this query. I have searched the internet and no other occurence of this problem seems to appear so I must be unique in some way... OS : XP Media Center I...
3
by: shapper | last post by:
Hello, Are there tools to compress CSS files? My CSS Files are usually big because of comments and the way I write them so that it is easy to read. Thanks, Miguel
0
by: barbara.plume | last post by:
We are in the early (development test) stages of upgrading from SQL200 to SQL2005. We have noticed that our backups, created with the append option, are not stored as individual .bak files when...
1
by: JA | last post by:
I am going to move to a different host. Can I get back up files of my SQL Server database (from the host) and use those to set up on the new host? And if so, is that what I should be asking for -...
1
by: Prabhat | last post by:
Hi friends, How can I create ONE SQL Agent JOB That will 2 activities: (Using SQL 2005) 1) Backup a specified Database (Full Backup) and store the backup file in a Specified FOLDER. 2)...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.