I work for a company that has quite a few laptop users (UNIX server,
Windows laptops) Since the laptops are connected to the network at
irregular times, scheduling a group backup at a pre-determined time
results in randomly missed laptops (those not connected to the network
when the backup kicks-off)
I am attempting to write a backup script that would be placed in the
backup command field for each of the laptop clients in Networker. The
laptop clients would then be placed in a group that would be scheduled
to run every hour or so. This will have the effect of picking up
laptops that are on at different times of the day.
When the group runs, each member clients script runs to see if it has
backed up already today. If it hasn't, the SAVE command runs, if it
has then it exits.
This is what I have so far:
-----------------------------------------------------
@Echo off
SET CurrDay=%DATE:~7,2%&::
SET CurrMonth=%DATE:~4,2%&::
SET CurrYear=%DATE:~10,4%&::
SET CurrDate=%CurrMonth%_%CurrDay%_%CurrYear%
If exist c:\%CurrDate%.txt goto exists
If not exist c:\%CurrDate%.txt goto Backup
:Backup
SAVE %*
echo. 2> %CurrDate%.txt
:exists
Echo %Currdate%.txt already ran!
-----------------------------------------------------
The script checks to see if a datestamp file has the current date, if
it doesn't it runs if it does, it exits.
This process ALMOST works. The datecheck works correctly, but when it
gets to saving the "All" saveset (represented by the %*) the C:\ bombs
out. This is what I get:
------------------------------------------------------
--- Unsuccessful Save Sets ---
* testlaptop:C:\ 2 retries attempted
* testlaptop:C:\ 07_02_2007.txt already exists!
--- Successful Save Sets ---
testlaptop: SYSTEM STATE:\ level=full, 37 MB 00:00:48 18
files
* testlaptop:SYSTEM STATE:\
* testlaptop:SYSTEM STATE:\ 07_02_2007.txt already exists!
testlaptop: SYSTEM DB:\ level=full, 18 MB 00:00:13 9
files
* testlaptop:SYSTEM DB:\
* testlaptop:SYSTEM DB:\ 07_02_2007.txt already exists!
testlaptop: SYSTEM FILES:\ level=skip, 0 KB 00:00:01 0
files
* testlaptop:SYSTEM FILES:\
* testlaptop:SYSTEM FILES:\ 07_02_2007.txt already exists!
testlaptop: ASR:\ level=full, 2411 KB 00:00:14 13
files
* testlaptop:ASR:\
* testlaptop:ASR:\ 07_02_2007.txt already exists!
server: index:testlaptop level=9, 1181 KB 00:00:00 23 files
What I need to figure out is how Networker processes the 'All' saveset
request so that the arguement date=date doesn't become TRUE before the
C:\ gets a chance to kick off.
Any ideas from the Networker groupmind?