Thursday, March 22, 2012

database backup question

For my database backup is there a way to only keep the last 5 backups? Curre
ntly my backup is creating a new .bak file with every backup. I only want a
.BAK for the last 5 days. So I only want the last 5 .bak files at any given
time.
Is there an option to set this or do I need to create a job of sort to delet
e them manually?You didn't mention what SQL Server version you use, however you can set up a
maintanence plan to delete old files older than ... days.
--
Ekrem nsoy
"Mike" <Mike@.community.nospam.com> wrote in message news:ufTkFc5JIHA.4584@.TK
2MSFTNGP03.phx.gbl...
For my database backup is there a way to only keep the last 5 backups? Curre
ntly my backup is creating a new .bak file with every backup. I only want a
.BAK for the last 5 days. So I only want the last 5 .bak files at any given
time.
Is there an option to set this or do I need to create a job of sort to delet
e them manually?|||I'm using SQL 2005.
Where in the maintance plan can I set that?
"Ekrem nsoy" <ekrem@.btegitim.com> wrote in message news:563B7A98-DAA7-4015-
818D-7840A3B55015@.microsoft.com...
You didn't mention what SQL Server version you use, however you can set up a
maintanence plan to delete old files older than ... days.
--
Ekrem nsoy
"Mike" <Mike@.community.nospam.com> wrote in message news:ufTkFc5JIHA.4584@.TK
2MSFTNGP03.phx.gbl...
For my database backup is there a way to only keep the last 5 backups? Curre
ntly my backup is creating a new .bak file with every backup. I only want a
.BAK for the last 5 days. So I only want the last 5 .bak files at any given
time.
Is there an option to set this or do I need to create a job of sort to delet
e them manually?|||In the "maintenance cleanup task".
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Mike" <Mike@.community.nospam.com> wrote in message news:Oh5D$w5JIHA.5116@.TK
2MSFTNGP03.phx.gbl...
I'm using SQL 2005.
Where in the maintance plan can I set that?
"Ekrem nsoy" <ekrem@.btegitim.com> wrote in message
news:563B7A98-DAA7-4015-818D-7840A3B55015@.microsoft.com...
You didn't mention what SQL Server version you use, however you can set up a
maintanence plan to
delete old files older than ... days.
Ekrem nsoy
"Mike" <Mike@.community.nospam.com> wrote in message
news:ufTkFc5JIHA.4584@.TK2MSFTNGP03.phx.gbl...
For my database backup is there a way to only keep the last 5 backups? Curre
ntly my backup is
creating a new .bak file with every backup. I only want a .BAK for the last
5 days. So I only want
the last 5 .bak files at any given time.
Is there an option to set this or do I need to create a job of sort to delet
e them manually?|||the 'maintenance cleanup task' wants an actual folder to 'clean' all of my
.bak files are in sub folders for each db, how will that work, or do i have
to create a clean up plan for each DB?
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:uP97Nz5JIHA.3940@.TK2MSFTNGP05.phx.gbl...
> In the "maintenance cleanup task".
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "Mike" <Mike@.community.nospam.com> wrote in message
> news:Oh5D$w5JIHA.5116@.TK2MSFTNGP03.phx.gbl...
> I'm using SQL 2005.
> Where in the maintance plan can I set that?
> "Ekrem nsoy" <ekrem@.btegitim.com> wrote in message
> news:563B7A98-DAA7-4015-818D-7840A3B55015@.microsoft.com...
> You didn't mention what SQL Server version you use, however you can set
> up a maintanence plan to delete old files older than ... days.
> --
> Ekrem nsoy
>
> "Mike" <Mike@.community.nospam.com> wrote in message
> news:ufTkFc5JIHA.4584@.TK2MSFTNGP03.phx.gbl...
> For my database backup is there a way to only keep the last 5 backups?
> Currently my backup is creating a new .bak file with every backup. I only
> want a .BAK for the last 5 days. So I only want the last 5 .bak files at
> any given time.
> Is there an option to set this or do I need to create a job of sort to
> delete them manually?
>|||I figured it out. thanks
"Mike" <Mike@.community.nospam.com> wrote in message
news:%23Wi18W6JIHA.3356@.TK2MSFTNGP02.phx.gbl...
> the 'maintenance cleanup task' wants an actual folder to 'clean' all of my
> .bak files are in sub folders for each db, how will that work, or do i
> have to create a clean up plan for each DB?
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote
> in message news:uP97Nz5JIHA.3940@.TK2MSFTNGP05.phx.gbl...
>|||The idea is, you'd have a Backup folder and you'd store your *.bak files in
that specific folder. When you set up a Cleanup Task, you'll point to that
folder and the Task will determine the old files (according to your setting)
and delete them. Also, you can check that sub folder option if there is a
granular backup folder hierarchy. So you'll not have to set up different
Cleanup Tasks for each db you backup under Backup folder.
Ekrem nsoy
"Mike" <Mike@.community.nospam.com> wrote in message
news:%23Wi18W6JIHA.3356@.TK2MSFTNGP02.phx.gbl...
> the 'maintenance cleanup task' wants an actual folder to 'clean' all of my
> .bak files are in sub folders for each db, how will that work, or do i
> have to create a clean up plan for each DB?
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote
> in message news:uP97Nz5JIHA.3940@.TK2MSFTNGP05.phx.gbl...
>sql

No comments:

Post a Comment