[download] Archiver

123

Senior Member
File Name: Archiver
File Submitter: 123
File Submitted: 19 Apr 2012
File Updated: 19 Apr 2012
File Category: Premise
Author: 123
Contact: PM me or post in forum.
Version: 1.0

Archiver creates and maintains a 30 day archive of Premise backups.

By default, Premise automatically performs a backup after a period of time has elapsed or after a transaction. It creates up to ten backup files in the Backups folder (backup000.xdo to backup009.xdo) and then overwrites them (i.e. it never exceeds ten files).

Given an active system, it is not unusual to find that all ten backup files were created on the same day or even within minutes of each other. This means that, in the event of a (rare) failure, you cannot restore your Premise system to the previous day's state because all ten files are recent and virtually identical (and maybe even corrupted).

Archiver is designed to make a copy of a Premise backup file and store it in a separate folder (Archives). It does this every day and maintains 30 archive files (Archive0.xdo to Archive29.xdo). It automatically overwrites the 30 files so there's no danger of filling your hard-drive with archive files. It also maintains a log (ArchiveLog.txt) that lists the date, time, and file name of each archive it has created (including error messages). In addition, it logs the same information to the Windows Event Log.

Archiver is not a Premise Module but a simple script file (VBScript). It scans Premise's ten backup files and selects the largest and most recent file to use as an archive. The selected file is copied from the Backups folder to the Archives folder (Archives folder is created automatically) and renamed as ArchiveX.xdo where X is a number from 0 to 29. The number is recorded as a system environment variable (PREMISE_ARCHIVE).

Installation
Copy archiver.vbs to a folder. I suggest \Program Files\Premise\SYS\bin.

If you are running Premise on a 32-bit version of Windows there is no need to modify archiver.vbs.

If you are running Premise on a 64-bit version of Windows you must modify archiver.vbs as follows:

Open archiver.vbs with a text-editor and change this:
Code:
sOSType = "" ' 32-bit
'sOSType = " (x86)" ' 64-bit.

to this (i.e. comment out the first line and uncomment the second line):
Code:
'sOSType = "" ' 32-bit
sOSType = " (x86)" ' 64-bit.

Save the modified file.

Start Windows Task Scheduler and create a new task that executes archiver.vbs at 1:00 AM (or some other off-peak time). Ensure your Windows environment is configured to execute .vbs files and not to open them in a text-editor!

Testing
Navigate to \Program Files\Premise\SYS\bin and double-click archiver.vbs. There should be a complete absence of any activity (i.e. no error messages). To confirm archiver, did its job, look in \Program Files\Premise\SYS\Archives. It should contain an Archive0.xdo file and an ArchiveLog.txt file. Open ArchiveLog and confirm it contains a valid entry (i.e. not an error message).

Usage
Use Builder's "File > Restore from Client" command to restore from an archive file.

Click here to download this file
 

123

Senior Member
I created Archiver in response to a problem I recently experienced.

Over the last five years, Premise has run very reliably except when tripped up by me while trying something experimental. When I create a new driver I manually perform a "File > Backup to Client", to ensure I have a recent backup, before installing the driver. On one or two occasions I've needed to restore the system from a backup.

Premise performs backups automatically (it creates ten backup files and then overwrites them) but, given the way these files are created (after elapsed time or a system transaction), they are rarely more than a few minutes apart in age. If you want to restore to a state older than a few minutes (hours at best) there is nothing available unless you recently created one manually using "File > Backup to Client".

On April 15th something went terribly wrong and it corrupted all ten of its backup files. Fortunately I had a manual backup albeit it was dated January 29th. Using a text-editor (yes, Premise's backups are human-readable XML) I cut out the good, new parts from one of the ten corrupt backups and pasted it over the old parts in the manual backup. The result was a usable but not completely up-to-date backup. I had to tweak and test several things before the system worked as it did before the failure. If I had a more recent manual backup (like from the previous day) the failure would have been a non-event.

The experience made me realize I needed an automated means of maintaining the last 30 days of backup files and archiver is the result. If 30 days seems excessive, archiver is nothing more than a VBScript file so feel free to modify it to your needs.
 

chucklyons

Active Member
Amazing! I can hardly wait to give it a try this weekend. Can you explain what the 32 vs 64 bit switch does? I mean, I don't now why that affects the operation of the VBS..
 

123

Senior Member
On 32-bit Windows, Premise is installed in \Program Files\Premise.

On 64-bit Windows, Premise is installed in \Program Files (x86)\Premise.

Archiver requires the correct path in order to copy files from one folder to another (from Backups to Archives). Originally, it inspected the OS and automatically determined the bit-length. However, this step adds overhead that is easily eliminated by simply hard-coding the bit-length.
 
Hi, im Fabiano from Brazil, and i need a help for PREMISE, can anybody help me???
Im a newbie with Premise, because i have instaled in only 2 days ago.
 
1) I have instaled it, and the AutomationBrowser too. My OS is WIN7-64bits with Internet Explorer 10 and Chrome.
 i dont understood one thing.
 in the Automation Browser (running in the same machine of the server Premise) i click in the Rooms listed, but it dont open the sub-rooms!!!!
 i have created a new home project, and used the sample (large house), but in both, the click on the rooms, locations, sub-rooms, dont works!!!!
 
"<electron> yea that's definitely a software related issue, you'll have to post on the premise forums for that one, sorry " - via chat.
 
 
2) Can i use with Google Chrome, and about iPhone and Android OS ??? How, please ???
 
 
PLEASE, ANYBODY RESPOND TO MY  2 QUESTIONS ABOVE, THANKS.........
 
 

I dont understand, because the UI loads so well, including the home icons, but  ON_CLICK over the icons dont load the next level HOME-LOCATIONS nor DEVICES!
Where is the problem? Maybe in Internet Explorer 10, WIN7-ultimate 64bits or AutomationBrowser or Premise_Server?
In the UI (AutomationBroswer) the aspect of icons is like a plain image, not a image with a link to another place! Is that normal?
 


 
  •  
 
Top