TM1 server stop and backup

Post Reply
wang_chris
Posts: 122
Joined: Thu Jan 31, 2013 1:03 pm
OLAP Product: TM1
Version: 10.2
Excel Version: 2007

TM1 server stop and backup

Post 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
TrevorGoss
Community Contributor
Posts: 217
Joined: Thu Aug 15, 2013 9:05 am
OLAP Product: TM1
Version: 10.2.1.1
Excel Version: 14.0.6129.5000

Re: TM1 server stop and backup

Post 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.
wang_chris
Posts: 122
Joined: Thu Jan 31, 2013 1:03 pm
OLAP Product: TM1
Version: 10.2
Excel Version: 2007

Re: TM1 server stop and backup

Post 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
wang_chris
Posts: 122
Joined: Thu Jan 31, 2013 1:03 pm
OLAP Product: TM1
Version: 10.2
Excel Version: 2007

Re: TM1 server stop and backup

Post 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
TrevorGoss
Community Contributor
Posts: 217
Joined: Thu Aug 15, 2013 9:05 am
OLAP Product: TM1
Version: 10.2.1.1
Excel Version: 14.0.6129.5000

Re: TM1 server stop and backup

Post 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.
tomok
MVP
Posts: 2836
Joined: Tue Feb 16, 2010 2:39 pm
OLAP Product: TM1, Palo
Version: Beginning of time thru 10.2
Excel Version: 2003-2007-2010-2013
Location: Atlanta, GA
Contact:

Re: TM1 server stop and backup

Post 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.
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
BrianL
MVP
Posts: 264
Joined: Mon Nov 03, 2014 8:23 pm
OLAP Product: TM1
Version: 9.5.2 10.1 10.2 PA2
Excel Version: 2016

Re: TM1 server stop and backup

Post 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.
TrevorGoss
Community Contributor
Posts: 217
Joined: Thu Aug 15, 2013 9:05 am
OLAP Product: TM1
Version: 10.2.1.1
Excel Version: 14.0.6129.5000

Re: TM1 server stop and backup

Post 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.
wang_chris
Posts: 122
Joined: Thu Jan 31, 2013 1:03 pm
OLAP Product: TM1
Version: 10.2
Excel Version: 2007

Re: TM1 server stop and backup

Post 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
Post Reply