SQL Server Maintenance Plan multiple database backups in a single folderSQL Server 2008 R2 database mirroring...

When does a person lose diplomatic status?

Protagonist constantly has to have long words explained to her. Will this get tedious?

What does an unprocessed RAW file look like?

Why don't you get burned by the wood benches in a sauna?

Are all power cords made equal?

What if I miss a connection and don't have money to book next flight?

How do I make my single-minded character more interested in the main story?

Words of Worship and Nefarious Lich

1990s-2000s horror alien movie with slugs infecting people through the mouth

Did ancient Germans take pride in leaving the land untouched?

Crack the bank account's password!

How can I handle players killing my NPC outside of combat?

How do I purchase a drop bar bike that will be converted to flat bar?

How do I add a strong "onion flavor" to the biryani (in restaurant style)?

Coworker is trying to get me to sign his petition to run for office. How to decline politely?

Plotting a bump function

How bad is a Computer Science course that doesn't teach Design Patterns?

Why is Shelob considered evil?

Disk space full during insert, what happens?

Why would you use 2 alternate layout buttons instead of 1, when only one can be selected at once

Why can all solutions to the simple harmonic motion equation be written in terms of sines and cosines?

Is Screenshot Time-tracking Common?

Minimum Viable Product for RTS game?

Is there a way to pause a running process on Linux systems and resume later?



SQL Server Maintenance Plan multiple database backups in a single folder


SQL Server 2008 R2 database mirroring - is it possible to have a slave server for multiple master servers?Rebuilding, truncating etc SQL Server 2008 maintenanceSQL Server 2008R2 Database refresh in isolated environmentHow to specify a task in a SQL Server maintenance plan conditionally?SQL Server Backup and Restore IncrementallyMaintenance Plan Job running at additional unscheduled times?Parallel Plan SelectionHow are SQL backups different from IT regular nightly server backups?Should I create multiple maintenance plans to backup more than 200 User databasesDatabase with replication and mirroring stuck in LOG_BACKUP after log file shrink













2















I am using SQL Server 2008 R2. I am trying to create a maintenance plan which backs up multiple databases into one single folder for a day.



For ex. I need to backup db1, db2, db3 and dump all these 3 .bak files into a single folder with a date.



Is this possible?



Any help would be really help. Thanks in advance.










share|improve this question
















bumped to the homepage by Community 9 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.






migrated from stackoverflow.com Dec 3 '12 at 9:46


This question came from our site for professional and enthusiast programmers.



















  • Let me try to explain bit clearly. for ex. i want a folder for a day something called "20121203" inside that i need all the backups like db1_20121203.bak, db2_20121203.bak, db3_20121203.bak then for the next day there should be a new folder called "20121204" inside that i need all the backups like db1_20121204.bak, db2_20121204.bak, db3_20121204.bak.

    – Gnanasekaran Kuppusamy
    Dec 3 '12 at 13:43
















2















I am using SQL Server 2008 R2. I am trying to create a maintenance plan which backs up multiple databases into one single folder for a day.



For ex. I need to backup db1, db2, db3 and dump all these 3 .bak files into a single folder with a date.



Is this possible?



Any help would be really help. Thanks in advance.










share|improve this question
















bumped to the homepage by Community 9 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.






migrated from stackoverflow.com Dec 3 '12 at 9:46


This question came from our site for professional and enthusiast programmers.



















  • Let me try to explain bit clearly. for ex. i want a folder for a day something called "20121203" inside that i need all the backups like db1_20121203.bak, db2_20121203.bak, db3_20121203.bak then for the next day there should be a new folder called "20121204" inside that i need all the backups like db1_20121204.bak, db2_20121204.bak, db3_20121204.bak.

    – Gnanasekaran Kuppusamy
    Dec 3 '12 at 13:43














2












2








2








I am using SQL Server 2008 R2. I am trying to create a maintenance plan which backs up multiple databases into one single folder for a day.



For ex. I need to backup db1, db2, db3 and dump all these 3 .bak files into a single folder with a date.



Is this possible?



Any help would be really help. Thanks in advance.










share|improve this question
















I am using SQL Server 2008 R2. I am trying to create a maintenance plan which backs up multiple databases into one single folder for a day.



For ex. I need to backup db1, db2, db3 and dump all these 3 .bak files into a single folder with a date.



Is this possible?



Any help would be really help. Thanks in advance.







sql-server-2008-r2 sql-server-agent






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 6 '12 at 10:22







Gnanasekaran Kuppusamy

















asked Dec 3 '12 at 6:39









Gnanasekaran KuppusamyGnanasekaran Kuppusamy

113




113





bumped to the homepage by Community 9 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community 9 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.






migrated from stackoverflow.com Dec 3 '12 at 9:46


This question came from our site for professional and enthusiast programmers.









migrated from stackoverflow.com Dec 3 '12 at 9:46


This question came from our site for professional and enthusiast programmers.















  • Let me try to explain bit clearly. for ex. i want a folder for a day something called "20121203" inside that i need all the backups like db1_20121203.bak, db2_20121203.bak, db3_20121203.bak then for the next day there should be a new folder called "20121204" inside that i need all the backups like db1_20121204.bak, db2_20121204.bak, db3_20121204.bak.

    – Gnanasekaran Kuppusamy
    Dec 3 '12 at 13:43



















  • Let me try to explain bit clearly. for ex. i want a folder for a day something called "20121203" inside that i need all the backups like db1_20121203.bak, db2_20121203.bak, db3_20121203.bak then for the next day there should be a new folder called "20121204" inside that i need all the backups like db1_20121204.bak, db2_20121204.bak, db3_20121204.bak.

    – Gnanasekaran Kuppusamy
    Dec 3 '12 at 13:43

















Let me try to explain bit clearly. for ex. i want a folder for a day something called "20121203" inside that i need all the backups like db1_20121203.bak, db2_20121203.bak, db3_20121203.bak then for the next day there should be a new folder called "20121204" inside that i need all the backups like db1_20121204.bak, db2_20121204.bak, db3_20121204.bak.

– Gnanasekaran Kuppusamy
Dec 3 '12 at 13:43





Let me try to explain bit clearly. for ex. i want a folder for a day something called "20121203" inside that i need all the backups like db1_20121203.bak, db2_20121203.bak, db3_20121203.bak then for the next day there should be a new folder called "20121204" inside that i need all the backups like db1_20121204.bak, db2_20121204.bak, db3_20121204.bak.

– Gnanasekaran Kuppusamy
Dec 3 '12 at 13:43










2 Answers
2






active

oldest

votes


















0














Yes it is possible
Use the Maintenance plan wizard its pretty easy to use.
Set your schedule type to recurring and frequency to daily on the "new job schedule form"
when you get to the "Define Back Up Database Task" form select the databases you wanna backup and select "create a backup file for every database " then set path of the folder you want to save to.



hope that helps






share|improve this answer
























  • But this is creating folder for each database. But what am asking is all 3 .bak files in a single folder for the day. Let me try to elaborate bit more. I have scheduled daily backup for 3 databases. When I see the backup file path, am getting 3 .bak files in it. what i would like to do is all these 3 backup files in a single folder.

    – Gnanasekaran Kuppusamy
    Dec 3 '12 at 13:39











  • for ex. i want a folder for a day something called "20121203" inside that i need all the backups like db1_20121203.bak, db2_20121203.bak, db3_20121203.bak then for the next day there should be a new folder called "20121204" inside that i need all the backups like db1_20121204.bak, db2_20121204.bak, db3_20121204.bak.

    – Gnanasekaran Kuppusamy
    Dec 3 '12 at 13:47











  • Then you are going to have to create separate maintenance plans for each database and direct the backups to the individual folders

    – Yugz
    Dec 3 '12 at 14:49











  • -1 since this does not answer the question.

    – Max Vernon
    Dec 3 '12 at 15:40



















0














You can create a job that's normally backup your databases.



then In a batch file, you can create a folder with datetime, and then copy files to it ( You can do it all via SQL with XP_cmdshell:



Use this code in a .bat file:



@echo off
Set vData=%DATE:~6,4%%DATE:~3,2%%DATE:~0,2%
mkdir %vData%
copy SOURCE*.bak %vData%


or instead of copy, you can use move.






share|improve this answer
























  • Put the bat file inside the folder you want the Date Folder to be created.Or, with mkdir, select the directory you want the file to be created.

    – Racer SQL
    May 29 '17 at 13:49













Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "182"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f29696%2fsql-server-maintenance-plan-multiple-database-backups-in-a-single-folder%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














Yes it is possible
Use the Maintenance plan wizard its pretty easy to use.
Set your schedule type to recurring and frequency to daily on the "new job schedule form"
when you get to the "Define Back Up Database Task" form select the databases you wanna backup and select "create a backup file for every database " then set path of the folder you want to save to.



hope that helps






share|improve this answer
























  • But this is creating folder for each database. But what am asking is all 3 .bak files in a single folder for the day. Let me try to elaborate bit more. I have scheduled daily backup for 3 databases. When I see the backup file path, am getting 3 .bak files in it. what i would like to do is all these 3 backup files in a single folder.

    – Gnanasekaran Kuppusamy
    Dec 3 '12 at 13:39











  • for ex. i want a folder for a day something called "20121203" inside that i need all the backups like db1_20121203.bak, db2_20121203.bak, db3_20121203.bak then for the next day there should be a new folder called "20121204" inside that i need all the backups like db1_20121204.bak, db2_20121204.bak, db3_20121204.bak.

    – Gnanasekaran Kuppusamy
    Dec 3 '12 at 13:47











  • Then you are going to have to create separate maintenance plans for each database and direct the backups to the individual folders

    – Yugz
    Dec 3 '12 at 14:49











  • -1 since this does not answer the question.

    – Max Vernon
    Dec 3 '12 at 15:40
















0














Yes it is possible
Use the Maintenance plan wizard its pretty easy to use.
Set your schedule type to recurring and frequency to daily on the "new job schedule form"
when you get to the "Define Back Up Database Task" form select the databases you wanna backup and select "create a backup file for every database " then set path of the folder you want to save to.



hope that helps






share|improve this answer
























  • But this is creating folder for each database. But what am asking is all 3 .bak files in a single folder for the day. Let me try to elaborate bit more. I have scheduled daily backup for 3 databases. When I see the backup file path, am getting 3 .bak files in it. what i would like to do is all these 3 backup files in a single folder.

    – Gnanasekaran Kuppusamy
    Dec 3 '12 at 13:39











  • for ex. i want a folder for a day something called "20121203" inside that i need all the backups like db1_20121203.bak, db2_20121203.bak, db3_20121203.bak then for the next day there should be a new folder called "20121204" inside that i need all the backups like db1_20121204.bak, db2_20121204.bak, db3_20121204.bak.

    – Gnanasekaran Kuppusamy
    Dec 3 '12 at 13:47











  • Then you are going to have to create separate maintenance plans for each database and direct the backups to the individual folders

    – Yugz
    Dec 3 '12 at 14:49











  • -1 since this does not answer the question.

    – Max Vernon
    Dec 3 '12 at 15:40














0












0








0







Yes it is possible
Use the Maintenance plan wizard its pretty easy to use.
Set your schedule type to recurring and frequency to daily on the "new job schedule form"
when you get to the "Define Back Up Database Task" form select the databases you wanna backup and select "create a backup file for every database " then set path of the folder you want to save to.



hope that helps






share|improve this answer













Yes it is possible
Use the Maintenance plan wizard its pretty easy to use.
Set your schedule type to recurring and frequency to daily on the "new job schedule form"
when you get to the "Define Back Up Database Task" form select the databases you wanna backup and select "create a backup file for every database " then set path of the folder you want to save to.



hope that helps







share|improve this answer












share|improve this answer



share|improve this answer










answered Dec 3 '12 at 7:13









YugzYugz

13915




13915













  • But this is creating folder for each database. But what am asking is all 3 .bak files in a single folder for the day. Let me try to elaborate bit more. I have scheduled daily backup for 3 databases. When I see the backup file path, am getting 3 .bak files in it. what i would like to do is all these 3 backup files in a single folder.

    – Gnanasekaran Kuppusamy
    Dec 3 '12 at 13:39











  • for ex. i want a folder for a day something called "20121203" inside that i need all the backups like db1_20121203.bak, db2_20121203.bak, db3_20121203.bak then for the next day there should be a new folder called "20121204" inside that i need all the backups like db1_20121204.bak, db2_20121204.bak, db3_20121204.bak.

    – Gnanasekaran Kuppusamy
    Dec 3 '12 at 13:47











  • Then you are going to have to create separate maintenance plans for each database and direct the backups to the individual folders

    – Yugz
    Dec 3 '12 at 14:49











  • -1 since this does not answer the question.

    – Max Vernon
    Dec 3 '12 at 15:40



















  • But this is creating folder for each database. But what am asking is all 3 .bak files in a single folder for the day. Let me try to elaborate bit more. I have scheduled daily backup for 3 databases. When I see the backup file path, am getting 3 .bak files in it. what i would like to do is all these 3 backup files in a single folder.

    – Gnanasekaran Kuppusamy
    Dec 3 '12 at 13:39











  • for ex. i want a folder for a day something called "20121203" inside that i need all the backups like db1_20121203.bak, db2_20121203.bak, db3_20121203.bak then for the next day there should be a new folder called "20121204" inside that i need all the backups like db1_20121204.bak, db2_20121204.bak, db3_20121204.bak.

    – Gnanasekaran Kuppusamy
    Dec 3 '12 at 13:47











  • Then you are going to have to create separate maintenance plans for each database and direct the backups to the individual folders

    – Yugz
    Dec 3 '12 at 14:49











  • -1 since this does not answer the question.

    – Max Vernon
    Dec 3 '12 at 15:40

















But this is creating folder for each database. But what am asking is all 3 .bak files in a single folder for the day. Let me try to elaborate bit more. I have scheduled daily backup for 3 databases. When I see the backup file path, am getting 3 .bak files in it. what i would like to do is all these 3 backup files in a single folder.

– Gnanasekaran Kuppusamy
Dec 3 '12 at 13:39





But this is creating folder for each database. But what am asking is all 3 .bak files in a single folder for the day. Let me try to elaborate bit more. I have scheduled daily backup for 3 databases. When I see the backup file path, am getting 3 .bak files in it. what i would like to do is all these 3 backup files in a single folder.

– Gnanasekaran Kuppusamy
Dec 3 '12 at 13:39













for ex. i want a folder for a day something called "20121203" inside that i need all the backups like db1_20121203.bak, db2_20121203.bak, db3_20121203.bak then for the next day there should be a new folder called "20121204" inside that i need all the backups like db1_20121204.bak, db2_20121204.bak, db3_20121204.bak.

– Gnanasekaran Kuppusamy
Dec 3 '12 at 13:47





for ex. i want a folder for a day something called "20121203" inside that i need all the backups like db1_20121203.bak, db2_20121203.bak, db3_20121203.bak then for the next day there should be a new folder called "20121204" inside that i need all the backups like db1_20121204.bak, db2_20121204.bak, db3_20121204.bak.

– Gnanasekaran Kuppusamy
Dec 3 '12 at 13:47













Then you are going to have to create separate maintenance plans for each database and direct the backups to the individual folders

– Yugz
Dec 3 '12 at 14:49





Then you are going to have to create separate maintenance plans for each database and direct the backups to the individual folders

– Yugz
Dec 3 '12 at 14:49













-1 since this does not answer the question.

– Max Vernon
Dec 3 '12 at 15:40





-1 since this does not answer the question.

– Max Vernon
Dec 3 '12 at 15:40













0














You can create a job that's normally backup your databases.



then In a batch file, you can create a folder with datetime, and then copy files to it ( You can do it all via SQL with XP_cmdshell:



Use this code in a .bat file:



@echo off
Set vData=%DATE:~6,4%%DATE:~3,2%%DATE:~0,2%
mkdir %vData%
copy SOURCE*.bak %vData%


or instead of copy, you can use move.






share|improve this answer
























  • Put the bat file inside the folder you want the Date Folder to be created.Or, with mkdir, select the directory you want the file to be created.

    – Racer SQL
    May 29 '17 at 13:49


















0














You can create a job that's normally backup your databases.



then In a batch file, you can create a folder with datetime, and then copy files to it ( You can do it all via SQL with XP_cmdshell:



Use this code in a .bat file:



@echo off
Set vData=%DATE:~6,4%%DATE:~3,2%%DATE:~0,2%
mkdir %vData%
copy SOURCE*.bak %vData%


or instead of copy, you can use move.






share|improve this answer
























  • Put the bat file inside the folder you want the Date Folder to be created.Or, with mkdir, select the directory you want the file to be created.

    – Racer SQL
    May 29 '17 at 13:49
















0












0








0







You can create a job that's normally backup your databases.



then In a batch file, you can create a folder with datetime, and then copy files to it ( You can do it all via SQL with XP_cmdshell:



Use this code in a .bat file:



@echo off
Set vData=%DATE:~6,4%%DATE:~3,2%%DATE:~0,2%
mkdir %vData%
copy SOURCE*.bak %vData%


or instead of copy, you can use move.






share|improve this answer













You can create a job that's normally backup your databases.



then In a batch file, you can create a folder with datetime, and then copy files to it ( You can do it all via SQL with XP_cmdshell:



Use this code in a .bat file:



@echo off
Set vData=%DATE:~6,4%%DATE:~3,2%%DATE:~0,2%
mkdir %vData%
copy SOURCE*.bak %vData%


or instead of copy, you can use move.







share|improve this answer












share|improve this answer



share|improve this answer










answered May 29 '17 at 13:45









Racer SQLRacer SQL

3,04042461




3,04042461













  • Put the bat file inside the folder you want the Date Folder to be created.Or, with mkdir, select the directory you want the file to be created.

    – Racer SQL
    May 29 '17 at 13:49





















  • Put the bat file inside the folder you want the Date Folder to be created.Or, with mkdir, select the directory you want the file to be created.

    – Racer SQL
    May 29 '17 at 13:49



















Put the bat file inside the folder you want the Date Folder to be created.Or, with mkdir, select the directory you want the file to be created.

– Racer SQL
May 29 '17 at 13:49







Put the bat file inside the folder you want the Date Folder to be created.Or, with mkdir, select the directory you want the file to be created.

– Racer SQL
May 29 '17 at 13:49




















draft saved

draft discarded




















































Thanks for contributing an answer to Database Administrators Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f29696%2fsql-server-maintenance-plan-multiple-database-backups-in-a-single-folder%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Szabolcs (Ungheria) Altri progetti | Menu di navigazione48°10′14.56″N 21°29′33.14″E /...

Discografia di Klaus Schulze Indice Album in studio | Album dal vivo | Singoli | Antologie | Colonne...

How to make inet_server_addr() return localhost in spite of ::1/128RETURN NEXT in Postgres FunctionConnect to...