Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Default path for Backup/Restore

Author  Topic 

adrian74
Starting Member

2 Posts

Posted - 2008-11-23 : 23:55:23
Does anyone know how to set the default path for backups and restores? Meaning when I am adding a device, the browse button currently takes you to somewhere like "C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup" I'd like to be to set the default to something like D:\Backups.

Thanks,
Adrian

lionofdezert
Aged Yak Warrior

885 Posts

Posted - 2008-11-24 : 02:46:07
Change registry value for

HKLM\Software\Microsoft\Microsoft SQL Server\MSSQL.1\MSSQLServer
here you will find "BackupDirectory" on right side of window, change it to your desired path
Go to Top of Page

SANDIP BHANGE
Starting Member

9 Posts

Posted - 2008-11-24 : 04:14:43
To schedule a database backup operation by using SQL Server Management Studio in SQL Server 2005, follow these steps:
Start SQL Server Management Studio.
In the Connect to Server dialog box, click the appropriate values in the Server type list, in the Server name list, and in the Authentication list.
Click Connect.
In Object Explorer, expand Databases.
Right-click the database that you want to back up, click Tasks, and then click Back Up.
In the Back Up Database - DatabaseName dialog box, type the name of the backup set in the Name box, and then click Add under Destination.
In the Select Backup Destination dialog box, type a path and a file name in the Destinations on disk box, and then click OK.
In the Script list, click Script Action to Job.
In the New Job dialog box, click Steps under Select a page, and then click Edit if you want to change the job parameters.

Note In the Job Step Properties - 1 dialog box, you can see the backup command.
Under Select a page, click Schedules, and then click New.
In the New Job Schedule dialog box, type the job name in the Name box, specify the job schedule, and then click OK.

Note If you want to configure alerts or notifications, you can click Alerts or Notifications under Select a page.
Click OK two times.

You receive the following message:
The backup of database 'DatabaseName' completed successfully.
Note To verify the backup job, expand SQL Server Agent, and then expand Jobs. When you do this, the SQL Server Agent service must be running.


sandip b
Go to Top of Page

SANDIP BHANGE
Starting Member

9 Posts

Posted - 2008-11-24 : 04:17:48
At the time of bacup u get the add & remove button, ....

So, remove the first path & then add the new path that u want.....

& take back up Or make schedule....

& at next time you will get this path again....



sandip b
Go to Top of Page

lionofdezert
Aged Yak Warrior

885 Posts

Posted - 2008-11-24 : 05:02:17
quote:
Originally posted by SANDIP BHANGE

At the time of bacup u get the add & remove button, ....

So, remove the first path & then add the new path that u want.....

& take back up Or make schedule....

& at next time you will get this path again....



sandip b



Default path could only be changed...
1- At the time of installation
2- Changing your registry values
Go to Top of Page

lionofdezert
Aged Yak Warrior

885 Posts

Posted - 2008-11-24 : 05:09:11
Why you don't like to simply execute

BACKUP DATABASE YourDatabaseName
TO DISK = N'D:\Backups\ yourdatabase.bak'
Go to Top of Page

adrian74
Starting Member

2 Posts

Posted - 2008-11-24 : 11:10:45
Thanks Lion, that was the registry setting I was looking for.

As for why I don't do it through a query, this is for development. I'm working with multiple versions of an app, doing backups and restores, moving from dev machine to laptop, etc... so I use the Manager a lot.
Go to Top of Page

lionofdezert
Aged Yak Warrior

885 Posts

Posted - 2008-11-24 : 11:54:44
cheers...

Go to Top of Page
   

- Advertisement -