Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CQC Automated Backup Version 2.0
#1
I have redone version 1 and changed over to VBScript for more features. This script will Stop the CQC Service and backup the CQC directory to a directory in form of a zip file or using Windows native NTBackup with the Host Name, date, time and CQC Version of the backup and then restart the CQC Service.

To use the 7-Zip feature of this script you need a free file archiver installed on the system and can be downloaded at http://www.7-zip.org with no command line switches.

To use the WinZip feature of this script you will need the Command Line Add-on a long with WinZip installed on the system and can be downloaded from http://www.winzip.com/downcl.htm. I have found this to be faster then 7-Zip

The default Backup Path is where the script is located.

Optional Command Switches
  • /m:['7'=7-Zip,'w'=WinZip,'n'=NTBackup] Defaults to /m:7
  • /d:[Destination Path] Defaults to current path
  • /r:[Restart 'y' or 'n'] Defaults to /r:y
  • /s Silent Run
  • /? Switch Options

Error Results
  • 0 = Sucessfull
  • 1 = Unable to stop CQC Service
  • 2 = Backup Failed
  • 3 = Unable to start CQC Service

Filename
  • CQCBackup_[HostName]_[Year][Month][Day]_[Hour][Minute][Second]_v[Version]

Current Version 2.0

Version Notes:
1.0 - First Public Release
2.0 - Redone in VBScript, added host name and CQC version to backup file

Download
http://www.kanak.com/Store/proddetail.as...DCQCBackup
Reply
#2
that's pretty cool, thanks. Have you tried putting this into Windows Scheduler? I'm wondering about just running this task weekly.
------------------------------------
Devices I can't stand and wish I could replace: SmartThings, Hue, Concerto, VRUSB
My vlogs: https://www.youtube.com/c/IVBsHomeAutomation
Reply
#3
If you do make sure to install the latest Windows Script Host then call the script using wscript //nologo and use the silent switch

wscript //nologo c:\backup\cqcbackup.vbs /s
Reply
#4
IVB Wrote:that's pretty cool, thanks. Have you tried putting this into Windows Scheduler? I'm wondering about just running this task weekly.

I do that with the old version. It has proven to be more reliable than my file backup software... Thanks TM.

And I reverse engineered the script and automated my SNMP driver in progress files to backup with a single click too. It's pretty handy...
Wuench
My Home Theater/Automation Website

[THREAD=5957]BlueGlass CQC Config[/THREAD]
[THREAD=10624]Wuench's CQC Drivers[/THREAD]
Reply
#5
Just remember that a backup should be done on ALL CQC servers and not just the Master.
Reply
#6
ToyMaster458 Wrote:If you do make sure to install the latest Windows Script Host then call the script using wscript //nologo and use the silent switch

wscript //nologo c:\backup\cqcbackup.vbs /s

Why is this needed? Is it becasue it is a VBS script?

Mick
Reply
#7
Trying to get the script you created but I have to create a profile on the website where it is. Since I am living in Canada it will not allow me to create the profile and thus I can not get the program. Help!!!
Reply
#8
correct. From my research in scheduling VB scripts it is best to run it this way. It may run without but it is always best to play it on the safe side.
Reply
#9
Trioxide Wrote:Trying to get the script you created but I have to create a profile on the website where it is. Since I am living in Canada it will not allow me to create the profile and thus I can not get the program. Help!!!
try it again.
Reply
#10
ToyMaster458 Wrote:correct. From my research in scheduling VB scripts it is best to run it this way. It may run without but it is always best to play it on the safe side.
Are you talking about the //nologo switch or using the wscript engine? The main difference between the wscript and cscript engines is that the wscript provides a gui interface while the csript is a console interface. When you use WScript.Echo using wscript it will bring up a dialog box while using the cscript engine it will echo it in the console screen. The //nologo switch is only needed if you use cscript as it has no effect for wscript and even at that it just supresses the first two lines that tell you the windows scripting version and copyright stuff. Usually you only need to worry about it if you are piping some type of script output to a file.

If you have a script that you want it to echo status information without requiring user interaction just use cscript and it will echo the info to the console window. I'm guessing you put in the silent mode using wscript because you are using wscript.echo in the script somewhere and the silent mode ignores it. If that is the case just call the script with cscript and it won't matter. If you want it to run in a hidden window though you do need to supress the echo method. If you look at the gvstart.vbs script I set up for the geovision driver it invokes the main script with the following

Code:
Set objShell = CreateObject("wscript.Shell")
objShell.Run "wscript.exe C:\gvsyslog.vbs"

This will cause the main script to run in a headless fashion, but if it contains any wscript.echo's it would require user intervention so in default mode I ignore echo's. I did this since the script could be running for a while before it completes its task. So what I did is kind of the opposite and included a debug mode so if I call the script using cscript gvsyslog.vbs /d it no longer ignores the wscript.echo's and outputs them to the console screen.

I'm
It's the early bird that catches the worm, but it's the second mouse that gets the cheese...
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Need download link for the 4.4.917 version sic0048 2 711 01-30-2016, 03:52 PM
Last Post: ellisr63
  Set up Aprilaire 8870's or buy non-automated controls? SpeedDemon 4 3,474 11-07-2010, 11:00 PM
Last Post: SpeedDemon
  Real-world issue of not stopping CQC pre-backup IVB 3 758 02-15-2010, 02:01 PM
Last Post: damian.flynn
  CQC Automated Backup Version 1.0 ToyMaster458 1 1,116 10-29-2009, 03:00 PM
Last Post: znelbok
  New PC, New OS, Old CQC Backup, Install Squintz 7 788 10-23-2008, 05:26 AM
Last Post: Squintz
  Downgrading Version Failure sic0048 5 876 05-31-2008, 02:02 PM
Last Post: Dean Roddey
  Next Webinar, 3/8, 8:30am PST. Interface Editing/Automated Events IVB 44 3,714 03-11-2008, 08:46 AM
Last Post: jkmonroe
  C-Bus Driver - New version for V2.3.x available rhamer 27 2,375 01-22-2008, 01:37 PM
Last Post: rhamer
  Error Importing CBus driver The Package is not a valid for this version of cqc roygul 2 669 01-13-2008, 08:10 PM
Last Post: rhamer
  Is there an "official" CQC Backup Process? Acropolis 10 935 04-19-2007, 10:51 AM
Last Post: Dean Roddey

Forum Jump:


Users browsing this thread: 1 Guest(s)