How to: Create a Backup Job Script

In order to simplify learning GRunScript we've written an example script using all the tags needed to write a full script file and added explanation after each tag or block of script using the script comments convention. (Sentences enclosed in <!-- --> are comments that the compiler will ignore and are only there for the benefit of whoever reviews the script).

Notes

 

<Backup> <!-- Starts the script file, a necessary tag that tells GBM to start interpreting -->

 

<!-- For the compiler to know where the script starts and where it ends it needs the < Backup > </ Backup > tags, all other tags should be enclosed within these two, the compiler will ignore anything not lying between them. -->

 

<Main> <!-- Basic backup job information. -->

<!-- Sets the basic backup job information, including:

-->

 

<Jobname> Test1 </Jobname>

<!-- Assigns a name to the backup job. -->

 

<Type> 0 </Type>

<!--Optional. Values 0 or 1, Default = 0. Indicates whether this is a new backup job or is meant to load an existing backup job. 0 = New backup job, 1= Loading an existing backup job. Loading an existing backup job would use the backup job name to load the settings and selections of the specified backup job and ignore the rest of the script. -->

 

<MediaType> 4 </MediaType>

<!-- Values 0,1,2,3,4,5. Indicates the storage media that will be used for backup. The user selects a number denoting the desired media, then GBM looks for its settings in the Media tag.

Media Types:

  • 0=Local/Lan

  • 1=Removable

  • 2=FTP

  • 3=CD,DVD

  • 4=Tape

  • 5=Online

 

<HideMonitor> FALSE </HideMonitor>

<!--Optional tag. Values TRUE or FALSE, Default = FALSE. Instructs GBM Server whether to display the backup monitor while running the script. When set to TRUE, the backup monitor will minimized when the backup start. -->

 

<TimeToBackup> 0 </TimeToBackup>

<!-- Optional. Values: integer value higher than -1, Default = 10. Sets the number of seconds for thea count-down before starting backup (Window for user to cancel backup)

  • -1= Default value.

  • 0= Disable countdown.

-->

 

<Description> Just a simple test </Description>

 

<DriveNumber> 0 </DriveNumber>

<!-- Number corresponding to the recorder's drive letter as listed inside GBM Server. I.e. 0 for the 1st drive, 1 for the 2nd drive -->

 

<SpaceType> 0 </SpaceType>

<!-- Whether to allow GBM Server to utilize all available space on each inserted disc or to use a fixed amount of space

Values:

  • 0 = Utilize maximum available space (Default)

  • 1 = Use fixed size

-->

 

<SplitSize> 600 mb </SplitSize>

<!-- When SpaceType (1) is selected, user must enter a fixed split size

Default is 600 MB -->

 

<UsePacketWriting>FALSE</UsePacketWriting>

<!-- Writing to CD/DVD media using third party packet writing software, default value is False -->

 

<Erase>FALSE</Erase>

<!-- Delete contents of inserted CD/DVD media before backup, default value is False -->

 

 

<TimeStamp> FALSE </TimeStamp>

<!-- Optional tag. Values TRUE or FALSE, Default = FALSE. Used to attach a timestamp to the backup filename, timestamps indicate when a backup run was carried out. Use <TimStampType> tag to choose timestamp format. -->

 

<TimeStampType> 0 </TimeStampType>

<!-- Values: 1,2,3,4,5,6,7 . C hoose a format for the attached timestamp

Values:

  • 0= Month dd, yyyy@hh:mm:ss AM/PM

  • 1= Day of the week, Month dd, yyyy

  • 2= Month dd, yyyy

  • 3= yyyy-mm,dd

  • 4= Month dd

  • 5= mm-dd-yyyy@hh-mm AM/PM

  • 6= mm-dd-yyyy@hh-mm-ss AM/PM

  • 7= hh.mm.dd AM/PM

-->

 

<Filename> My Backup </Filename>

<!--Name assigned to the output file/folder produced by backup, if not specified, job name will be used. -->

<Deployment> 0 </Deployment>

<!--Specify whether you wish to run, deploy, or deploy and run this job. Where 0 = run, 1= Deploy and run, and 2= Deploy. -->

</Main>

 

<Media> <!-- Where to store the backup. -->

<!-- GBM Server will look in this section for the tag corresponding to the media type selected in <Type> tag under <Main> to retrieve the settings associated with the selected media type. -->

 

<LocalLan> <!-- Backup to a storage location readily accessible from Windows Explorer (Internal/External hard disks, NAS, SAN, LAN locations etc ...) -->

 

<OutputPath> I:\ </OutputPath>

<!-- Output folder, if not specified, default backup location will be chosen \My Documents\My Backups -->

 

<SplitSize/>

<!-- Split size, default value 2 GB. -->

 

</LocalLan>

 

<Removable> <!--Backup to multiple disks (floppy disks, JAZ disks, ZIP disks etc...) -->

 

<Drive> H:\ </Drive>

<!-- Drive letter for the selected removable media drive, selecting a non-removable media device will cause backup to fail -->

 

<Erase>FALSE</Erase>

<!-- Causes GBM Server to erase each inserted disk before backup without prompting the user. WARNING: Selecting this option will erase ALL data on the inserted disks -->

 

</Removable>

 

<FTP> <!-- Backup to an FTP server or a remote location using FTP service -->

 

<Host> ftp.server.com </Host>

<!-- Hostname or IP address or remote location -->

 

<Port> 21 </Port>

<!-- Port number for establishing connection, default value is 21. -->

 

<Username> myusername </Username>

<!-- Username for FTP account. -->

 

<Password> 123456 </Password>

<!--Password for FTP account, WARNING: Password will not be secure if saved inside the script -->

 

<Folder> backup_test1 </Folder>

<!-- Folder on the FTP location to backup data to -->

 

<PassiveMode>TRUE</PassiveMode>

<!-- Connecting in Passive or active mode, Default value is False -->

 

<UsePreConfig>TRUE </UsePreConfig>

<!-- Use pre-configured settings (Get settings from the machine, for example: "proxy settings" from the control panel). Default is TRUE. -->

 

<KeepLocally>TRUE</KeepLocally>

<!-- Causes GBM Server to keep the temporary backup files stored locally on the machine before being uploaded, default value is False -->

 

<StorePath> </StorePath>

<!-- Specify local temporary folder used for storing backup files created before being uploaded to the FTP location, if left empty the default backup location will be used -->

 

<UseFTPProxy>FALSE</UseFTPProxy>

<!-- Enable connecting through an FTP proxy, default value is False -->

 

<FTPProxy></FTPProxy>

<!-- FTP Proxy address -->

 

<FTPProxyPort> 21 </FTPProxyPort>

<!-- FTP Proxy port, default value (21) -->

 

<FTPProxyUsername></FTPProxyUsername>

<!-- FTP Proxy access Username -->

 

<FTPProxyPass></FTPProxyPass>

<!-- FTP Proxy access Password -->

 

</FTP>

 

<DVD_CD> <!-- Backup to CD/DVD media -->

<!--Optional description for the created backup job, if left empty it will be set to default (Time and date of job creation). -->

</DVD_CD>

 

<TAPE> <!-- Backup to tape media. -->

 

<DriveNumber> 0 </DriveNumber>

<!-- Number corresponding to the tape drive as listed in GBM Server; 0 for 1st drive, 1 for 2nd etc..., default is 0-->

 

<Erase>FALSE</Erase>

<!-- Erase contents of inserted tape -->

 

</TAPE>

<Online> <!-- Backup to Online storage. -->

<!--Sets the online backup settings-->

<Email>jondoe@hotmail.com</Email> <!-- enter login email to online backup -->

<Password> My Password </Password> <!--enter your online backup login password -->

<Secure>True</Secure> <!-- specify whether or not you wish to transmit data securely using SSL or standard. True= Secure, False=SSL --> 

 

</Online>

 

</Media>

 

<Data> <!-- Select files/folders and items to be backed up. -->

 

<MyProfile> <!-- Select items from the My Profile tab in GBM Server. -->

 

<OutlookExpress> <!-- Backup Outlook Express emails and settings -->

 

<Identity>

<!-- Select Outlook Express identities to be backed up, backing up multiple identities is supported, identities can be selected by either specifying the identity name or its corresponding GUID-->

<IdentityName> Main identity </IdentityName>

<!-- Select an identity by specifying its name as displayed in Outlook Express Identity Manager or GBM Server, or enter $$ALL$$ to backup all identities -->

 

<IdentityGUID/>

<!-- Select an identity by supplying its GUID. To find an identity's GUID refer to Windows Registry key

HKEY_CURRENT_USER\Identities -->

 

</Identity>

 

</OutlookExpress>

 

<Outlook> <!-- Backup Outlook emails, PST files, settings etc ... -->

 

<ProfileName> </ProfileName>

<!-- Select a profile by supplying its name, You can see a list of all available Outlook profiles by going to Control Panel -> Mail -> Show Profiles. Enter $$ALL$$ to backup all profiles -->

 

</Outlook>

 

<Registry> <!-- Backup Windows Registry. -->

 

<Key>ALL</Key>

<!-- Backup entire registry database -->

 

<Key> HKEY_LOCAL_MACHINE\SOFTWARE </Key>

<!-- Backup a specific key with all its sub-keys. -->

 

</Registry>

 

<WinSettings>FALSE</WinSettings> <!-- Backup Windows settings, True to backup all supported Windows settings, and False to skip them -->

 

<IESettings>FALSE</IESettings> <!-- Backup Internet Explorer settings, values are True or False -->

 

<Favorites>FALSE</Favorites> <!-- Backup Favorites, values are True or False -->

 

<Wab>FALSE</Wab> <!-- Backup Windows Address Book, values are True or False -->

 

<Desktop>FALSE</Desktop> <!-- Backup the Desktop area, values are True or False -->

 

<Fonts>FALSE</Fonts> <!-- Backup Windows fonts, values are True or False -->

 

<MyDocuments>True</MyDocuments> <!-- Backup My documents folder, values are True or False -->

 

<MediaPlaylist> <!-- Parse media playlists and backup media files they point to>

 

<File> I:\playlist\1.m3u </File> <!-- Full path and file name of the media playlist -->

 

</MediaPlaylist>

<WindowsMail>True<\WindowsMail><!-- Backup Windows Mail, values are True or False -->

<WindowsContacts>True<\WindowsContacts><!-- Backup Windows Mail, values are True or False -->

 

 

</MyProfile>

 

<MyFolders> <!-- Backup files and folders. -->

 

<FolderIncludeSub="FALSE"> I:\CD1 </Folder>

<!-- Path for folder selected for backup, use of Path Strings is supported.

IncludeSub: instructs GBM Server whether to include all subfolders of the selected folder, Default is True. -->

 

 

<FolderIncludeSub="TRUE"> $$P_DESKTOP$$ </Folder>

<!-- Path for folder selected for backup, use of Path Strings is supported.

IncludeSub: instructs GBM Server whether to include all subfolders of the selected folder, Default is True. -->

 

<File> I:\CD2\layout_start_V3.psd </File>

<!-- Full path and filename of file to be backed up, use of wildcards is supported -->

<Filters> <!--Add filters -->

<Rule IncludeSub="FALSE"> I:\CD1 </Rule>

<!-- Path for folder selected to create filter rules, use of Path Strings is supported.

IncludeSub: instructs GBM Server whether to include all subfolders of the selected folder, Default is True. -->

<FilterType>0</FilterType>

<!-- Specify whether to include or exclude the following filters 0= include  1=exclude-->

<Filters>"*.doc;*.txt"</Filters>

<!-- filter the following types; wildcards are supported -->

 

</Filters>

</MyFolders>

 

<MyPrograms> <!-- Backup items listed in MY Plugins tab. -->

 

<Program> Winzip </Program> <!-- Name of item as listed in My Plugins. -->

 

</MyPrograms>

 

</Data>

 

<Settings>

 

<!-- Configures backup job settings, including:

-->

 

<BackupType> 0 </BackupType>

<!-- Values 0, 1, 2, 3. Set the backup type for this backup job. See backup types.

Backup Types:

  • 0=Full

  • 1=Incremental

  • 2=Mirror

  • 3=Differential

-->

 

<CompressionType> 1 </CompressionType>

<!-- Optional tag. Values 0 or 1, Default = 1. Compression Type, 0= Without compression (Preserves file/folder structure), 1= use zip format compression. See compression. -->

 

<CompressionLevel> 6 </CompressionLevel>

<!-- Optional tag. Values 0 - 9, Default = 6. Level of compression (if compression was selected in the previous tag). Ranges between 0 (No compression, fastest) and 9 (Maximum compression, slowest). -->

 

<Security> 0 </Security>

<!-- Values = 0, 1, 2. Default= 0. Data protection type to be used, 0=None, 1= Zip Password protection, 2=AES encryption. See Security. -->

 

<AESType> 0 </AESType>

<!-- AES Encryption strength (if encryption security is selected in the previous tag)

Values:

  • 0=128 bit

  • 1=192 bit

  • 2= 256 bit

-->

 

<Password> MyPassword246 </Password>

<!-- Password for security type 1 and 2. WARNING: Security option when using GRS scripting is compromised since the password is saved without encryption in the script. -->

 

<Password_Confirm> MyPassword246 </Password_Confirm>

<!-- Retype the password for confirmation. -->

 

<ShutdownGBM>FALSE</ShutdownGBM>

<!-- Optional tag. Values TRUE or FALSE. Exit GBM Server when backup is complete. -->

 

<ShutdownComputer>FALSE</ShutdownComputer>

<!-- Optional tag. Values TRUE or FALSE, Default = FALSE. Perform power saving action when backup is complete, See next tag. -->

 

<ShutdownComputerType> 0</ShutdownComputerType>

<!-- Values: 0, 1, 2, 3. Power saving action to perform when backup is complete.

  • 0 = Shut down

  • 1 = Hibernate

  • 2 = Logoff

  • 3 = Standby

-->

 

<PreJobCommandWait="TRUE"></PreJobCommand>

<!-- Optional tag. Type a command to be performed automatically right BEFORE the backup job starts. Takes one parameter: Wait: When set to TRUE, means that GBM will wait for this process to end before starting backup.  -->

 

<PostJobCommandWait="TRUE"></PostJobCommand>

<!-- Optional tag. Type a command to be performed automatically right AFTER the backup job ends. Takes one parameter: Wait: When set to TRUE, means wait for the previous process to end before running the command. -->

 

</Settings>

 

</Backup>