Backup einrichten TM1

Prolog

SaveDataAll();

sBackupDir = ‘D:\hapec\tm1servers\#Backup\’;

sDataDir = ‘D:\hapec\tm1servers\hapecAnalyticServer\data\’;

s_SingleQuote = CHAR(39);

s_Exec = ‘powershell -command “Add-Type -A System.IO.Compression.FileSystem; [IO.Compression.ZipFile]::CreateFromDirectory’;

s_FileName = ‘TM1Server_’|’hapecAnalyticServer’|’_Backup_’ | TIMST(NOW(), ‘\Y\m\d \h.\i’, 1) | ‘.zip’;

s_Command = s_Exec |'(‘|s_SingleQuote|sDataDir|s_SingleQuote|’, ‘|s_SingleQuote|sBackupDir|s_FileName|s_SingleQuote|’)’;

EXECUTECOMMAND(s_Command, 0);

Beispielvorlage GMG

SaveDataAll();

sBackupDir = ‘C:\hapec\TM1Servers\#Backup\’;

sDataDir = ‘C:\hapec\TM1Servers\GMG\Data\’;

s_SingleQuote = CHAR(39);

s_Exec = ‘powershell -command “Add-Type -A System.IO.Compression.FileSystem; 

[IO.Compression.ZipFile]::CreateFromDirectory’;

s_FileName = ‘TM1Server_’|’GMG’|’_Backup_’ | TIMST(NOW(), ‘\Y\m\d \h.\i’, 1) | ‘.zip’;

s_Command = s_Exec |'(‘|s_SingleQuote|sDataDir|s_SingleQuote|’, ‘|s_SingleQuote|sBackupDir|s_FileName|s_SingleQuote|’)’;

EXECUTECOMMAND

(s_Command, 0);

0 Kommentare

Hinterlasse einen Kommentar

An der Diskussion beteiligen?
Hinterlasse uns deinen Kommentar!

Schreibe einen Kommentar