Page 1 of 1

TM1 server stop and backup

Posted: Tue Jan 06, 2015 8:24 am
by wang_chris
We have a production TM1 server on windows system, we want it to be backup at mid-night of each day.

How can we stop the running TM1 server in command line? and restart the TM1 server in command line?

If the server is set as windows service, can we have it stop and restart at specific time?

Or is there a better suggestion to do the full backup with human intervention at mid-night?

Regards,
Chris

Re: TM1 server stop and backup

Posted: Tue Jan 06, 2015 8:36 am
by TrevorGoss
Hello Chris,

our team does somthing quite similar, for our production services we back them up every hour.
How can we stop the running TM1 server in command line? and restart the TM1 server in command line?
You do not have to stop the TM1 server to back up your data. You can run a script on the flat files, that script can be called via a TI, which will call the SaveDataAll function before you fire the script.
If the server is set as windows service, can we have it stop and restart at specific time?
You can indeed, use the enviroment variables for windows, such as the time set by the windows clock, we run a batch script.
Or is there a better suggestion to do the full backup with human intervention at mid-night?
My recommendation is that you run a chore, which fires a script inside a TI, which will back up the flat data files every hour. Create the back up in a zip folder, use the date and time as part of the name of the zip folder, so you can go back to a precise time.

Any more questions, just ask.

Thanks.

Re: TM1 server stop and backup

Posted: Tue Jan 06, 2015 9:14 am
by wang_chris
I have found windows commands to stop and start TM1 windows service as below:

>service_tm1s.bat stop TM1ServerConfigFolder TM1Servername

>service_tm1s.bat start TM1ServerConfigFolder TM1Servername


But TrevorGoss' suggestion sounds better, if we can do the backup online. I will test it. Thank you, TrevorGoss.

Regards,
Chris

Re: TM1 server stop and backup

Posted: Tue Jan 06, 2015 10:51 am
by wang_chris
I can call SaveDataAll in TI process.

To double confirm,
1) does 'SaveDataAll' function force TM1 write data from memory to hard disk,
2) does the effect of 'SaveDataAll' similar as ful backup of database?

Regards,
Chris

Re: TM1 server stop and backup

Posted: Tue Jan 06, 2015 1:55 pm
by TrevorGoss
does 'SaveDataAll' function force TM1 write data from memory to hard disk
It does excatly that, it also restarts the log file. The IBM documentation explains, in detail, what this function does.

http://www-01.ibm.com/support/knowledg ... vedataall
does the effect of 'SaveDataAll' similar as ful backup of database?
It depends on the database, so I cannot give you an answer to that.

Re: TM1 server stop and backup

Posted: Tue Jan 06, 2015 7:18 pm
by tomok
It depends on your definition of a "backup". Saving cube data to disk does backup the information from memory, but it does not protect you against hardware faults on the TM1 server. The best way to protect yourself from that is to backup the files from the data folder to either a SAN or some other file backup mechanism.

Re: TM1 server stop and backup

Posted: Tue Jan 06, 2015 7:33 pm
by BrianL
wang_chris wrote: 1) does 'SaveDataAll' function force TM1 write data from memory to hard disk,
2) does the effect of 'SaveDataAll' similar as ful backup of database?
Essentially, TM1 keeps the various metadata files continuously up to date as edits are made. Data edits however get written out to the transaction log in real time instead of to the .cub files.

Performing a SaveDataAll will write out the entire cube data to disk for any cube that has different data in the .cub file versus the in-memory copy. It then truncates the transaction log so there continues to be a consistent snapshot on disk. SaveDataAll is essentially a sync of cube data from memory to disk. It is not a disk backup mechanism.

That's why a common practice is to run SaveDataAll then backup. This makes sure your backup has all the cube data edits prior to the run of SaveDataAll.

Re: TM1 server stop and backup

Posted: Fri Jan 09, 2015 9:07 am
by TrevorGoss
That's why a common practice is to run SaveDataAll then backup. This makes sure your backup has all the cube data edits prior to the run of SaveDataAll.
Indeed, in our backup script we pick up everything apart from the files that may be not be of such importance or if they are too big, such as the .blb files or the .feeder files.

Chris, it is important to take into account your disk space, when creating hourly back ups. If you run a back up of your TM1 service every hour of every day of every month, eventully your disk will run out of space.

What we do to avoid this, is we run a weekly program that deletes the back up files after a certain period. Such as a month ago. It is up to you what you delete and how you delete them, but it is important to take your disk space into account.

Re: TM1 server stop and backup

Posted: Wed Jan 14, 2015 3:49 am
by wang_chris
Thank you for your all's advice.

We will make daily backup at midnight, since we don't suffer so frequent changes.

I have writen a schedule chore to savealldata and then copy all data directory to another backup space.

Regards,
Chris