Automatically include new databases in backup job
hotspex
Posts: 7
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
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
Comments
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,
Development
Red-Gate Software