Hi All-
My and my co-worker (neither of us know SQL very well other than Admin tasks) are trying to setup SQL backups to go into a specific folder depending on the day of the week.
For production servers we currently use a software called "RedGate" which all you need to do is replace the folder of the day with "
However, we use the SQL agent to backup non-prod servers. This is the script we are currently using:
Text
-- Name of database DECLARE @DatabaseName VARCHAR(50) -- Path of backup folder. DECLARE @BackupPath VARCHAR(256) -- Name of Backup file DECLARE @BackUpFileName VARCHAR(256) -- Get current date used for suffixing with file name. DECLARE @Date VARCHAR(20) -- Specify path for database backup directory. Make sure directory exists before executing script, else script will give error. SET @BackupPath = "\\nas\backup\Week1\\...