Cancel
Showing results for 
Search instead for 
Did you mean: 

How to set backup_mode to read-only when running it as a Schedule Task?

Solution Partner Pioneer Solution Partner Pioneer
Solution Partner Pioneer

 

Hi to all!

 

Has anyone experienced running the backup_modes utility as a scheduled task?

 

I have already searched how to run bat files automatically in windows, but I can't think of how to set this utility's mode to read-only.

 

Sample in Siemens documentation is:  

backup_modes -u=infodba -p=password -g=dba -m=rdonly

 

Regards,

Lyka

 

4 REPLIES

Re: How to set backup_mode to read-only when running it as a Schedule Task?

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom
If you are supporting a near 24/7 environment then this utility is mandatory. I use it as part of a larger "backup" strategy. As you know, you want to capture the database at the same time that you capture the volumes for your backup set. How can you do that when people are writing to the volumes and messing up your nice database backup?

What the script does:
1. Place the volumes in "blobby" mode so that files are written to a temporary location (not the volume).
2. Perform a database "hot" backup.
3. Place the volumes in "normal" mode. Files in the temp location are moved to the volumes.
4. Email the log(s) [or a link to the logs] to an admin.

Then adding the script to a schedule task so that backups are run nightly makes sense. I hope that takes the mystery out of what you are trying to do.

Randy Ellsworth, Teamcenter Architect, Applied CAx, LLC
NX 11 | SW 2016 | Creo 4 | TcUA 11.4
Evaluating: AW 3.4

Re: How to set backup_mode to read-only when running it as a Schedule Task?

Solution Partner Pioneer Solution Partner Pioneer
Solution Partner Pioneer

Hi Randy,

 

May I know how can I set the "blobby" mode in this utility if I run it as a schedule task?

 

My plan is to automatically run it in windows. But blobby mode is not a default parameter in this utility. Am I right?

 

Re: How to set backup_mode to read-only when running it as a Schedule Task?

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom
In a script "MyBackup.cmd":
:: Set the environment
set TC_ROOT=<path>\tcroot
set TC_DATA=<path>\tcdata
call %TC_DATA%\tc_profilevars.bat
:: Put volumes in blobby mode
backup_modes -u=infodba -p=infodba -g=dba -m=blobby
:: Backup DB
SQLCMD -E -S touch -Q "BACKUP DATABASE tc TO DISK='E:\tc.bak'"
:: Put volumes in normal mode
backup_modes -u=infodba -p=infodba -g=dba -m=normal

Then run the script "MyBackup.cmd" as a scheduled task.

Randy Ellsworth, Teamcenter Architect, Applied CAx, LLC
NX 11 | SW 2016 | Creo 4 | TcUA 11.4
Evaluating: AW 3.4

Re: How to set backup_mode to read-only when running it as a Schedule Task?

Solution Partner Pioneer Solution Partner Pioneer
Solution Partner Pioneer

Thanks very much Randy! Smiley Happy