Automatically include new databases in backup job

Compresses, encrypts, secures and monitors SQL Server backups.

Moderators: JonathanWatts, Chris Auckland, eddie davis, Colin Millerchip, Brian Harris, james.billings, RBA, petey

Automatically include new databases in backup job

Postby hotspex » Thu Apr 18, 2013 2:42 pm

Hi,

I created a new scheduled backup job. And I selected "Include these: All". This selected all of my existing databases, User and System. The backup job works as expected.

Now, we have a web application that automatically creates databases when someone (application user) creates a new project through the application GUI. Also, after "n" number of days of inactivity, the application knows to detach the inactive databases.

My question is: Does the backup job know to include the newly created databases? And does it know not to backup the detached databses? Or do I need to always be updating my backup job to make sure any changes (additions, deletions) need to be accounted for?

thanks
Hani
hotspex
 
Posts: 5
Joined: Thu Mar 24, 2011 8:19 pm

Postby RBA » Thu Apr 18, 2013 4:20 pm

Hi,

Your backup job will backup all currently attached databases if you select 'all'. So this will take account of new DBs and forget detached ones. To confirm this absolutely, you can check the 'script' tab on the final step of the scheduled backup wizard to ensure the BACKUP DATABASES [*] syntax is used. If you've already created the job, you can inspect the SQL Server agent step via SSMS.

For reference: https://documentation.red-gate.com/disp ... SEargument

Regards,
Robin Anderson
Development
Red-Gate Software
RBA
 
Posts: 148
Joined: Fri Jun 05, 2009 12:13 pm
Location: Cambridge

Postby hotspex » Thu Apr 18, 2013 4:45 pm

Perfect! Thanks!
hotspex
 
Posts: 5
Joined: Thu Mar 24, 2011 8:19 pm


Return to SQL Backup 7

Who is online

Users browsing this forum: No registered users and 0 guests

cron