Author |
Message |
sonsonifty Guest
|
Posted: Mon Jun 04, 2007 6:48 pm Post subject: Running script after execution |
|
|
Hi,
I have a daily backup being done with Vice Versa. I want to run a global script at the beginning and end of the job. I am able to get the job start script to run but can't get any kind of end script to run.
I enabled custom scripts after execution.
I have tried using different scripts, including simple "hello" scripts, have tried putting the script in the dir where the job profile is and renaming appropriately, etc., etc.
Here is a log file showing that custom scripts are enabled and then you can see that the job completes without running the script.
Would appreciate any help or ideas!
************************************************************
Profile Started.
************************************************************
Version: ViceVersa PRO 2 Build 2012 (SN55)
Command Line: "C:\Program Files\ViceVersa Pro 2\ViceVersa.exe"
System: , (Terminal Services), (Terminal Services in Remote Admin Mode), (Uniprocessor Free), (x86-32 Processor) v5.2 Build:3790 Service Pack:1
User: **domain**\administrator
Computer: name.toronto.domain.ca
**** Profile: c:\documents and settings\administrator.toronto\my documents\viceversa pro 2\test.fsf
**** - Folders -
**** Source: "c:\vv test1\"
**** Target: "c:\vv test2\"
**** Include Subfolders: Yes
**** - Comparison Settings -
**** Comparison Type: Size and Timestamp
**** - Execution Settings -
**** Method: Backup (Mirror Source to Target)
**** No overwrite / read-only / error confirmations
**** Log File: "C:\Documents and Settings\All Users\Application Data\ViceVersa PRO 2\test.log" (max 10000 KB)
**** No archive for deleted/replaced source files
**** No archive for deleted/replaced target files
**** Limit Bandwidth to: 1.00MB/Sec
**** Speed: 38 Buffer Size: 32768
**** Run custom scripts after execution
Checking source c:\vv test1\ ...
Checking target c:\vv test2\ ...
Comparing ...
Comparing done.
- Status Summary -
- Total Files - Source: 5 (177B) - Target: 4 (177B)
- Excluded Files - Source: 0 (0) - Target: 0 (0)
- Matched Files - Source: 4 (177B) - Target: 4 (177B)
- Single Files - Source: 1 (0) - Target: 0 (0)
- Newer Files - Source: 0 (0) - Target: 0 (0)
- Older Files - Source: 0 (0) - Target: 0 (0)
- Total Subfolders - Source: 2 - Target: 2
- Excluded Subfolders - Source: 0 - Target: 0
- Matched Subfolders - Source: 2 - Target: 2
- Single Subfolders - Source: 0 - Target: 0
- To Do - Backup (Mirror Source to Target)
- Files to Add - Source: 0 (0) - Target: 1 (0)
- Files to Update - Source: 0 (0) - Target: 0 (0)
- Files to Delete - Source: 0 (0) - Target: 0 (0)
- Subfolders to Add - Source: 0 - Target: 0
- Subfolders to Delete - Source: 0 - Target: 0
---- Start Execution ----
---- Backup (Mirror Source to Target) (Source: c:\vv test1\ Target: c:\vv test2\) ----
---- Start copying ----
-- Copying to target...
Copying file c:\vv test1\New Wordpad Document.doc <to> c:\vv test2\New Wordpad Document.doc (0) [OK].
-- Done: 1 (0) Err: 0 (0) Skipped: 0 (0) Tot: 1 (0) --
-- Average Transfer Rate: 0/Sec -- Elapsed Time: 0 sec
Re-comparing ...
---- Copying finished ----
---- End ----
- Execution Summary -
- Added Files - Source: 0 (0) - Target: 1 (0)
- Updated Files - Source: 0 (0) - Target: 0 (0)
- Deleted Files - Source: 0 (0) - Target: 0 (0)
- Added Subfolders - Source: 0 - Target: 0
- Deleted Subfolders - Source: 0 - Target: 0 |
|
Back to top |
|
|
TGRMN Software Site Admin
Joined: 10 Jan 2005 Posts: 8759
|
Posted: Tue Jun 05, 2007 1:26 am Post subject: |
|
|
Hi, what type of script did you create? .bat , .vbs or .js?
More info on scripts: http://www.tgrmn.com/web/kb/item62.htm
Make sure you are using the latest ViceVersa PRO 2 build (free upgrade)
Global scripts must be located in the "GlobalScripts" folder in the ViceVersa PRO installation folder, usually 'c:\program files\ViceVersa PRO2\GlobalScripts'
They must be called global_start.ext (global_start is the global script to run when a profile starts) or global_end.ext (global_end is the global script to run when a profile ends). .ext can be one of the supported extensions, that is .vbs, .js, .bat or .cmd _________________ --
TGRMN Software Support
http://www.tgrmn.com
http://www.compareandmerge.com |
|
Back to top |
|
|
sonsonifty Guest
|
Posted: Tue Jun 05, 2007 1:44 pm Post subject: |
|
|
Hi,
The version I am running is version 2, build 2012. It is a .bat file that I am trying to run though I have tried .vbs to no avail also. I have tried running it as local and global. I have checked the script names and locations many times. The thing is that the first script is in the same place and works fine.
I'm running Windows Server 2003; it is a domain controller, RAS server and file and print server.
I was running the demo VV software and activated it about 1 month ago.
The system is up to date and running fine.
I'm perplexed! |
|
Back to top |
|
|
sonsonifty Guest
|
Posted: Tue Jun 05, 2007 8:39 pm Post subject: |
|
|
Ok I have isolated the problem better. If I schedule the job and let it run at the scheduled time, then both the starting and ending script run correctly.
There must be a bug though with running the script manually. I set it as a global script and the starting script DID work - just the end one didn't.
Oh well, it will be a scheduled job for me so I don't really care. Heads up to anyone who wants to run global scripts manually, you might run into this. |
|
Back to top |
|
|
TGRMN Software Site Admin
Joined: 10 Jan 2005 Posts: 8759
|
Posted: Tue Jun 05, 2007 11:47 pm Post subject: |
|
|
Hi, when you run the profile manually, did you "execute" a method or just compared source and target? I think the issue may be that VV only runs the script AFTER execution, it does not run the script if source and target are only manually compared. _________________ --
TGRMN Software Support
http://www.tgrmn.com
http://www.compareandmerge.com |
|
Back to top |
|
|
sonsonifty Guest
|
Posted: Wed Jun 06, 2007 1:42 pm Post subject: |
|
|
No, I was running compare and execute and it was doing the full operation - look at the log I posted. That's the corresponding log with no additions/deletions.
I really think there is a bug of some kind with running the global end script when you manually run a job. Maybe not for everyone - but certainly for me and I have checked and rechecked the obvious things a dozen times.
As I said, the job will be scheduled when deployed so I'm okay now - but I'd be curious to see if anyone else has had this. |
|
Back to top |
|
|
TGRMN Software Site Admin
Joined: 10 Jan 2005 Posts: 8759
|
Posted: Wed Jun 06, 2007 11:19 pm Post subject: |
|
|
Quote: | I really think there is a bug of some kind with running the global end script when you manually run a job. |
Hi, I will check this on my machine. thanks _________________ --
TGRMN Software Support
http://www.tgrmn.com
http://www.compareandmerge.com |
|
Back to top |
|
|
TGRMN Software Site Admin
Joined: 10 Jan 2005 Posts: 8759
|
Posted: Thu Jun 07, 2007 8:53 am Post subject: |
|
|
Hi
I tried using the backup profile that is setup on my machine and it works also when running manually. See log (significant parts in bold):
************************************************************
Version: ViceVersa PRO 2 Build 2014 (SN78)
Command Line: "C:\Program Files\ViceVersa Pro 2\ViceVersa.exe"
System: Windows XP (Professional), (Terminal Services in Remote Admin Mode), (Uniprocessor Free), (x86-32 Processor) v5.1 Build:2600 Service Pack:2
User: ****
Computer: Laptop.tgrmn.net
**** Profile: C:\Documents and Settings\User\Desktop\My Documents - backup.fsf
**** - Folders -
**** Sources: (Locked)
**** Targets: (Archived)
**** Create sources/targets that do not exist
**** Network: connect to "\\nas\winxpibm\" with user "winxpibm" and disconnect when done
**** - Comparison Settings -
**** Comparison Type: Size and Timestamp
**** - Execution Settings -
**** Method: Backup (Mirror Source to Target)
**** No overwrite / read-only / error confirmations
**** Log File: "C:\Documents and Settings\All Users\Application Data\ViceVersa PRO 2\log3.log" (max 1000 KB)
**** No archive for deleted/replaced source files
**** Archive deleted/replaced target files to: "\\nas\winXPibm\My Documents-Archive\"
**** Smart archive
**** Move files to archive folders (instead of copying)
**** Archive max. 5 copies per file
**** Copy files even if timestamp changes after initial comparison
**** Use 'Volume Shadow Copy' to copy open files for source
**** Verify successful file copy by checking file CRC
**** Run custom scripts before comparison
**** Run custom scripts after execution
Connecting to "\\nas\winxpibm" with user "winxpibm" ... Connected.
Running script C:\Program Files\ViceVersa Pro 2\GlobalScripts\Global_start.bat
Script Output:
smartctl version 5.36 [i686-mingw32-xp-sp2] Copyright (C) 2002-6 Bruce Allen
=== START OF INFORMATION SECTION ===
Model Family: Fujitsu MHTxxxxAH family
Device Model: FUJITSU MHT2040AH
Serial Number: NP0JT4C2H20M
Firmware Version: 846C
User Capacity: 40,007,761,920 bytes
Device is: In smartctl database [for details use: -P show]
ATA Version is: 6
ATA Standard is: ATA/ATAPI-6 T13 1410D revision 3a
Local Time is: Thu Jun 07 18:14:03 2007 CAST
SMART support is: Available - device has SMART capability.
Enabled status cached by OS, trying SMART RETURN STATUS cmd.
SMART support is: Enabled
=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED
End Script Output
Script return code: 0
Checking source C:\Documents and Settings\User\My Documents\ ...
Checking target \\nas\winXPibm\My Documents\ ...
Comparing ...
Comparing done.
Checking source C:\Documents and Settings\User\Desktop\ ...
Checking target \\nas\winXPibm\Desktop\ ...
Comparing ...
Comparing done.
- Status Summary -
- Total Files - Source: 2,527 (2.37GB) - Target: 2,527 (2.37GB)
- Excluded Files - Source: 0 (0) - Target: 0 (0)
- Matched Files - Source: 2,527 (2.37GB) - Target: 2,527 (2.37GB)
- Single Files - Source: 0 (0) - Target: 0 (0)
- Newer Files - Source: 0 (0) - Target: 0 (0)
- Older Files - Source: 0 (0) - Target: 0 (0)
- Total Subfolders - Source: 232 - Target: 232
- Excluded Subfolders - Source: 0 - Target: 0
- Matched Subfolders - Source: 232 - Target: 232
- Single Subfolders - Source: 0 - Target: 0
Source and Target are identical.
No files/folders need to be copied/deleted.
Disconnected from \\nas\winxp-ibm
Running script C:\Program Files\ViceVersa Pro 2\GlobalScripts\Global_end.vbs
Script Output:
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.
User Name: *
Password: *
From E-Mail: *
To E-Mail: *
SMTP Server: *
Send only if error: False
Port: 25
Ssl: False
DONE.
End Script Output
Script return code: 0 _________________ --
TGRMN Software Support
http://www.tgrmn.com
http://www.compareandmerge.com |
|
Back to top |
|
|
Citizen Snips
Joined: 13 Jul 2008 Posts: 5
|
Posted: Sun Jul 13, 2008 3:03 am Post subject: |
|
|
If you are running a profile manually, the end scripts will only run once you close the status window. I was having the exact same problem as the OP until I figured this out.
Here are the exact steps to take to ensure the end scripts run when you are running a profile manually. I start by assuming VV Pro is not running.
1. Open VV Pro
2. Click 'Compare' in the window that pops up. Start scripts will be run at this time - results will be written to the log file.
3. In the new window that pops up, click 'Execute' to execute the script.
4. Once the script has completed, close the status and summary windows that pop up.
5. In the remaining window, click the 'Close' button at the bottom of the window, slightly left of center. It is at this point that end scripts will be run, and the results will be written to the log file. This is where I was having a problem - I was not clicking the 'Close' button after my profile had completed. The end scripts will not run until you close that window.
After closing that window, the only window showing at this point should be the small window with the large 'Compare' button in the bottom center.
I realize this is a very old post, but I spent a while trying to figure out why my end scripts were not running. Once I finally figured it out, I thought I'd post it here because no solution had been posted, and I am almost positive this was the OP's problem. |
|
Back to top |
|
|
TGRMN Software Site Admin
Joined: 10 Jan 2005 Posts: 8759
|
Posted: Sun Jul 13, 2008 11:24 pm Post subject: |
|
|
Quote: | If you are running a profile manually, the end scripts will only run once you close the status window. |
Yes that must have been the issue. If you run a profile manually, only when you return to the main ViceVersa PRO window (closing the comparison window) the script will run. While you are in the comparison window you can still copy, delete files, etc. the profile 'execution' is not considered finished.
thank you for clarifying this. _________________ --
TGRMN Software Support
http://www.tgrmn.com
http://www.compareandmerge.com |
|
Back to top |
|
|
|
|
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © phpBB Group
|