Вы находитесь на странице: 1из 23

IDrive Web Based Backup Management -- Documentation

IDrive Web Based Backup


Management

1
IDrive Web Based Backup Management -- Documentation

INDEX

1. INTRODUCTION...…………………………………………………………………..03

2. ARCHITECTURE - HOST - PROXY - VIEWER COMMUNICATION……..04

3. FUNCTIONALITY IN GENERAL IN THE FORM OF QUESTIONS………06

4. VERY IMPORTANT NOTE IN SENDING THE NAME AND PATH OF A


FOLDER TO HOST FROM VIEWER…………………………………………
09

5. BROWSING/ NAVIGATION…………………………………………………...10

6. FUNCTIONALITY/ STEPS IN 100 COMMAND……………………………..15

7. FUNCTIONALITY/ STEPS IN 101 COMMAND……………………………..17

8. FUNCTIONALITY/ STEPS IN 104 COMMAND……………………………. 18

9. FUNCTIONALITY/ STEPS IN 105 COMMAND..……………………………19

10. FUNCTIONALITY/ STEPS IN 106 COMMAND……………………………..20

11. FUNCTIONALITY/ STEPS IN 107 COMMAND……………………………..21

12. FUNCTIONALITY/ STEPS IN 108 COMMAND……………………………..22

13. FUNCTIONALITY/ STEPS IN 109 COMMAND……………………………..23

2
IDrive Web Based Backup Management -- Documentation

IDRIVE WEB BASED BACKUP MANAGEMENT

INTRODUCTION: With this an IDrive user can

Manage his Backup Set,


View/ change schedule information
View/ download Session log files as well complete log file

from anywhere in the world through web provided the IDrive host exe is running on his
system and Web Management option is enabled.

3
IDrive Web Based Backup Management -- Documentation

ARCHITECTURE ---- HOST - PROXY - VIEWER COMMUNICATION


The communication channels between the HOST, PROXY and VIEWER can be
explained diagrammatically like below

HOST/ Client PROXY VIEWER


System

PROXY maintains a database table with the following columns

Host Username HOST Host Port


Description number
search HOST1 2001
search HOST2 2002
search HOST3 2003

If a HOST with the username say ‘search’ connects to PROXY the respective
connected HOST descriptions (i.e. HOST connections) will be entered in to the database.
Whenever a VIEWER tries to connect with the same username ‘search’, proxy returns the
available host descriptions. If atleast one HOST connection is available then VIEWER
will make a SSLSocket connection with the proxy. Once VIEWER successfully connects
to then PROXY then VIEWER sends a command in the form

"VIEWER : username : hostdescription$”

will be sent to the PROXY. With this viewer command, proxy will link this VIEWER to
the particular HOST DESCRIPTION of the username ‘search’ and will establish a
communication channel between the VIEWER and the respective HOST DESCRIPTION
I.e. HOST CONNECTION.

So from next onwards, if any command or data is sent from this VIEWER, PROXY will
receive that command or data and will send to the particular HOST CONNECTION. And
similarly if the HOST CONNECTION sends any data, PROXY will receive the data and
then sends it to the respective VIEWER.

NOTE: NEVER HOST and VIEWER directly communicates. Always HOST sends data
to the PROXY, which in turn will be read by the PROXY and sent to the respective

4
IDrive Web Based Backup Management -- Documentation

VIEWER. Similarly VIEWER always sends command or data to the PROXY, which in
turn will be read by PROXY and sent to the respective HOST.

IMPORTANT NOTE: PROXY is being used because we cannot expect all the CLIENT
systems to have PUBLIC IP Address and if a CLIENT system has a PUBLIC IP address
also, the respective user may not permit to communicate directly due to security reasons.

5
IDrive Web Based Backup Management -- Documentation

FUNCTIONALITY IN GENERAL IN THE FORM OF QUESTIONS

Why username is being sent as username_web to the proxy in case of Idrive web
based Backup management?
The reasons are
a. Same proxy is being used for both the SEARCH and BACKUP management
Functionalities.
b. Same set of commands are being used in SEARCH and BACKUP
Management
So to differentiate SEARCH and BACKUP functionalities we are using usernames
differently I.e. just username for SEARCH and username_web for BACKUP
management.

What are the scripts and what are the parameters to the scripts being used?

Script 1: https://s.idrive.com//cgi-
bin/AuthenticateIDRIVE_web.cgi?USER=username_web&PASSWORD=password&HO
STDESCRIPTION=hostdesc&REGISTRATIONKEY=&VIEWER=Y&ACTION=4

when we use ACTION=4, the AuthenticateIDRIVE_web.cgi will authenticate and then


return the available host descriptions I.e. the host connections to the proxy.

Script 2: https://s.idrive.com//cgi-
bin/AuthenticateIDRIVE_web.cgi?USER=username_web&PASSWORD=password&HO
STDESCRIPTION=hostdesc&REGISTRATIONKEY=&VIEWER=Y&ACTION=3

When we use action=3, this script will check whether that particular host connection is
still active or not? The particular host description we send as a parameter to this script.

Script 3: https://s.idrive.com/cgi-
bin/AuthenticateIDRIVE_web.cgi?USER=username_web&PASSWORD=password&HO
STDESCRIPTION=null&REGISTRATIONKEY=null&VIEWER=N&ACTION=1

When we use action=1, this script will return the proxy and port details for that particular
user.

How VIEWER is getting connected to the proxy?

The connection code is in the method ConnectToProxyServer_web of the bean


IDClient.java.

The following are the steps in connecting to the proxy and ultimately to have a
communication channel between the VIEWER and the HOST

1. First is to fetch the available host connections to the proxy I,e active host

6
IDrive Web Based Backup Management -- Documentation

Descriptions by calling the script AuthenticateIDRIVE_web.cgi with Action = 4.


2. Next fetch the proxy name and port number to which the viewer should connect
by sending the username_web and password.
3. With the fetched proxy and port number, a SSLSocket connection is established
With the proxy by using the code sslConn =
(SSLSocket)sslSockFact.createSocket(proxy_name,connecting_port);
4. Then a viewer command in the form "VIEWER : username_web :
hostdescription$” will be sent to the proxy. With the viewer command, proxy will
link this viewer to the particular host on a particular host description which are
being passed as part of viewer command.
5. Then proxy will send RC4 key data which is not useful for viewer, so viewer has
to read it fully and has to ignore so that next reads will give the correct data to the
viewer.
6. After reading out the RC4 key data, viewer will send a dummy I,e 1, which
indicates to the host that viewer got connected to the proxy I,e to the host.
7. Then viewer has to send the password to the host which validates the password
and send either PASS if valid or FAIL if invalid. This is an extra check during the
establishment of the connection.
8. Once viewer receives PASS from the host, viewer can continue communicating
with the host with that established connection.

When VIEWER code will try for connecting to host more than once and why?
In the following cases VIEWER will try for HOST connection more than once

Case 1: For the first time in a WEB session, I,e when the VIEWER tries for the first time
and if VIEWER cannot connect to host, the VIEWER will try one more time to connect
to the host with a time gap 6 seconds (waits for 6 seconds, before giving second try)

The reason for the above is, host takes some 6 to 7 seconds to connect to the proxy. It
may so happen that VIEWER tries to connect to the HOST even before the HOST
connects to proxy. In this situation VIEWER will try for one more time by waiting for 6
seconds, expecting HOST to connect to the proxy in these 6 seconds.

In this case, if VIEWER will not get a host connection after trying for one more time,
then user is redirected to an error page with the message “To use this feature, enable Web
Management on your computer. For this, right-click the IDrive icon from the tray and
click the Web Management menu option. If the Web Management option is not available
on the IDrive tray icon, download the latest client setup and install.”

Case 2: When in between an operation due to some reason if host disconnects with the
proxy, VIEWER will try maximum THREE times for a host connection with a time gap
of 5 secs between the trials. If VIEWER gets the host connection, it continues
communicating with host connection. In this case, if VIEWER will not get a host
connection after trying for three times also, then user is redirected to an error page with
the message “There was a problem, please try again later.”

7
IDrive Web Based Backup Management -- Documentation

NOTE: HOST WILL NEVER SEND COMMAND TO VIEWER, HOST ONLY SENDS
DATA.
It’s a Client-Server application model, where client always places order regarding a
service to the server and gets the data or service done from the server.

Sending a command to host:


VIEWER always sends commands of length three characters, because at the HOST end it
is hardcoded to read three characters from VIEWER to receive a command. This is
predefined at the HOST and VIEWER ends. It’s a protocol.

Sending a value/data to host:


Value can be Password or a file name or a folder name etc
In this case, host will not know how many characters to read from the VIEWER to get
that value. So as part of protocol we decided to send a value like below
1. First send the length of the value. – Length of the value itself is sent in three
characters or 5 characters or some n characters, which is predefined for that
functionality (like folder browsing, file download etc) at both the VIEWER and
the HOST ends.
2. Second send the actual value.

Receive data from HOST:


In this case, first VIEWER needs to know the length of the data being sent by the HOST.
HOST will first send the length of the data in bytes followed by $ symbol. Ex 1024$
means 1024 bytes is the length of the data. So VIEWER will read until it encounters $
symbol and considers that as the length of the data. Later VIWER will read that many
bytes from the HOST. In the above example VIEWER will read 1024 bytes of data from
the HOST.

8
IDrive Web Based Backup Management -- Documentation

VERY IMPORTANT NOTE IN SENDING THE NAME AND PATH OF A


FOLDER TO HOST FROM VIEWER

In IDrive web based backup management, the folders Desktop, My Documents,


Favorites, Outlook Express, Outlook, Music, Pictures, Videos etc are considered as
SHORTCUT folders. For these folders path will end with the respective SHORTCUT
folder name I, e path value of these folders from the HOST will contain the respective
folder’s name.

Other folders than the above are considered as NORMAL folders. In case of NORMAL
folders, path element will not contain the respective NORMAL folder name.

Examples: For a SHORTCUT folder like Desktop the path value is C:\Documents and
Settings\admin\Desktop\, I, e the path value have the folder name in it.

For a NORMAL folder like Download the path value is C:\Documents and
Settings\admin I, e the path value does not contain the folder name.

So as part of sending the folder’s path and name value to the HOST in order to fetch
that particular folder’s content we need to follow separate method/strategy for
SHORTCUT folders and NORMAL folders.

Method/ strategy for sending SHORTCUT folder’s path and name value: In this case
just send the path value received from the HOST, which contains the name of the folder
also.

EVEN in case of Shortcut folders, if the path is not ending with the respective shortcut
folder name, then append name to the path and send to the HOST.

Method/ strategy for sending NORMAL folder’s path and name value: In this case
append the name of the respective folder to its path and send to the HOST

9
IDrive Web Based Backup Management -- Documentation

BROWSING/ NAVIGATION

We identify each element (a file or folder) with an id called pathid. Pathids will start from
p0 I.e. first browsed/visited folder will be assigned p0 as pathid, the second
browsed/visited folder will be assigned p1 as pathid, the third browsed/visited folder will
be assigned p2 as pathid and so on.

The pathids of the elements within a browsed folder will be of the form pathid of the
browsed folder_respective element’s index/position within this browsed folder.
Index/position of the elements in a browsed folder starts from 0. For example, if the
browsed folder’s pathid is p0 and it has some ‘n’ elements, the first element’s pathid will
be p0_0, second element’s pathid will be p0_1, third element’s pathid will be p0_2 and so
on up to ‘p0_n’.

IMP NOTE: 1. If we browse a folder whose pathid is WITH an underscore, then that
folder will get a new pathid I.e. we build the navigation path in this case.

2. If we browse a folder whose pathid is WITHOUT an underscore (this case will come
when browser back is used or if we click on a folder in the Navigation path), then that
folder will not be assigned any new pathid instead it will continue to have its previous
pathid I.e. we WILL NOT build the Navigation path in this case

Code wise explanation

First we get the contents of root folder I.e. contents of 100 command are being
considered as root folder contents. The root folder’s pathid is home or p0. Its elements
pathid would be p0_0, p0_1, p0_2 and so on up to p0_n where n is the count of the root
folder’s elements.

Now, if we click on a folder with the pathid p0_0, it will be assigned a new pathid p1 and
its elements pathids would be p1_0, p1_1, p1_2 and so on upto p1_n where n is the count
of the p1 folder’s elements.

Now, if we click on a folder with the pathid p1_4, it will be assigned a new pathid p2 and
its elements pathids would be p2_0, p2_1, p2_2 and so on upto p2_n where n is the count
of the p2 folder’s elements.

IMP NOTE: 1. Now, if the previously browsed p0_0 folder is browsed again using
BROWSER BACK then this folder will be assigned a new pathid p3(Check in navigation
path) and its elements pathids would be p3_0,p3_1,p3_2 and so on upto p3_n where n is
the count of the elements of the p3 folder.

2. Now, if we click on a folder in the Navigation path with the pathid p0, it WILL NOT
be given a new pathid, but instead it will continue to have its previous pathid ONLY I.e.
p0 and its elements pathids would be p0_0, p0_1, p0_2 and so on upto p0_n where n is
the count of the elements of the p0 folder.

10
IDrive Web Based Backup Management -- Documentation

The browsing code’s flow is of the following cases:

Case 1: pathid WITHOUT an underscore. It has the following subcases

Sub case 1: When the pathid is p0, just fetch the root folder’s content by sending the 100
command.

Sub case 2: When the pathid is other than p0. This again has two subcases

Case a: If the requested pathid is p2 and p2 is not equal to the currentpathid. In this case
first fetch the p2 pathid’s folder’s path and name from the pathInfoList arraylist and then
fetch the contents of p2 by sending 101 command and by sending the path and name of
the p2 folder. P2 WILL CONTINUE TO HAVE PATHID AS P2 ONLY.

Case b: If the requested pathid is p2 and p2 is equal to the currentpathid.


Then fetch the contents from the session and display. P2 WILL CONTINUE TO HAVE
PATHID AS P2 ONLY.

Case 2: pathid WITH an underscore. This has the following sub cases.

Sub case 1: The value before UNDERSCORE in the requested pathid’s value is EQUAL
to the currentpathid

In this case fetch the contents from the session and from this contents fetch the folder’s
path and name whose position in the list is the value after the UNDERSCORE in the
requested pathid’s value. Then fetch the folder’s contents by sending 101 command and
the folder’s path and name.

Sub case 2: The value before UNDERSCORE in the requested pathid’s value is NOT
EQUAL to the currentpathid.

In this case first fetch the contents of the folder whose pathid is the value before the
UNDERSOCRE in the requested pathid’s value. Then fetch the folder’s path and name
from this list whose position is the value after UNDERSCORE in the requested pathid’s
value. In the end fetch this folder’s contents by sending 101 command and the folder’s
path and name.

11
IDrive Web Based Backup Management -- Documentation

Navigation path Building:

We use the arraylist pathInfoList to maintain the list of pathids and name, path of the
folders that we have browsed so far. We build the Navigation path from the value of
currentFolderPathName.

A String array currentPaths will be filled with the values of the currentFolderPathName
spitted with “\”.

CurrentPaths = currentFolderPathName.split(“\\\\”);

Example pathInfoList
Pathid Folder’s path ending with folder name
P0 Blank
P1 C:\
P2 C:\download\
P3 C:\download\file\

Example currentFolderPathName = c:\download\file\


Example currentPaths [] = currentFolderPathName.split(“\\\\”);

currentPaths[0] = “c:”;
currentPaths[1] = “download”;
currentPaths[2] = “file”;

A string variable navigationPath will have the navigation value for the root folder by
default.

We use two for loops; the outer for loop will loop through the values of currentPaths
starting from the 0th element of currentPaths. The inner for loop will loop through the
values of the pathInfoList starting from the end element of pathInfoList

The logic has the following steps infact each step is an iteration of the outer loop which
covers inner for loop also….

NOTE: pathInfoList is an arraylist. Each element of pathInfoList is a String array


of length two. 0th string element is the pathid of a folder, 1st string element is the path
and name of that folder.

Step 1: Take the 0th element of currentPaths append it with “\”, then loop through the
pathInfoList (starting from the end element of pathInfoList) until this value matches with
any of the second element of pathInfoList (second element of pathInfoList contains path
and name of a particular folder, first element contains the respective pathid). Once we

12
IDrive Web Based Backup Management -- Documentation

find the matching element, get its pathid and path value and generate the navigation value
for this and then append this to the default navigation path.

Step 2: Now append the 1st element of currentPaths + “\” to the 0th element of
currentPaths + “\”, then loop through the pathInfoList (starting from the end element of
pathInfoList) until this (0th element + “\”+1st element + “\” ) value matches with any of
the second element of pathInfoList. Once we find the matching element, get its pathid
and path value and generate the navigation value for this and then append this to the
default navigation path.

Step 3: Now append the 2nd element of currentPaths plus “\” to the value 0th element of
currentPaths+ “\” + 1st element of currentPaths + “\”. Now loop through the pathInfoList
(starting from the end element of pathInfoList) until this value matches with any of the
second element of pathInfoList. Once we find the matching element, get its pathid and
path value and generate the navigation value for this and then append this to the default
navigation path.

Step 4: Continue like above till the end element of currentPaths array.

Below is the code….

String name = "";


currentFolderPathName = (String)session.getAttribute("currentFolderPathName");
String currentPaths [] = currentFolderPathName.split("/");
String nPath = "";

for(i = 0; i <currentPaths.length; i++)


{

if(!currentPaths[i].equals(""))
{
if(nPath.equals(""))
{
nPath = currentPaths[i] + "/";
}
else
{
if(nPath.endsWith("/"))
{
nPath = nPath+currentPaths[i];
}
else
{
nPath = nPath+"/"+currentPaths[i];
}
}

13
IDrive Web Based Backup Management -- Documentation

name = currentPaths[i];
for(int j = (pathInfoList.size()-1); j >=0; j--)
{
pathInfo = (String [])pathInfoList.get(j);
if(nPath.equals(pathInfo[1]))
{
navigationPath = navigationPath + "/" +
"<a "+
"href='/idrivee/jsp/IDDSNResults.jsp?op=Browse&pid="+
pathInfo[0]+"' class='linkbody'>"+name+"</a>";
pathInfo = null;
break;
}

}//end of for loop


}// End of if (! currentPaths [i].equals(""))

}// End of main for loop

14
IDrive Web Based Backup Management -- Documentation

FUNCTIONALITY/ STEPS IN 100 COMMAND

100 command is to fetch the root contents I, e Drives list and the shortcut folders

Below are the steps in sending 100 command to HOST from VIEWER and receiving
the corresponding data from the HOST

1. VIEWER sends 100 to the HOST of three-character length and goes to receive
mode.
NOTE: Just before sending the 100 command, VIEWER will check whether that
particular HOST connection (identified with the HOST DESCRIPTION) is still active or
not by using the script AuthenticateIDRIVE_web.cgi with action value = 3 and by
passing the required parameters like HOST DESCRIPTION, USERNAME_WEB and
PASSWORD.
If that particular HOST connection is active VIEWER will send the 100 command. If
NOT (may got disconnected due to net problem or host will disconnect after 5 minutes)
VIEWER will again try THRICE for a new HOST connection with a time gap of 5
seconds between each trial, if it gets it will continue with this new HOST connection by
sending 100 otherwise VIEWER will redirect user to an error page with the message
“There was a problem, please try again later”.
2. As it is PREDEFINED in the protocol, for 100 command HOST will send the list
of Drives, the shortcut folders (Desktop, My Documents, Outlook Express,
Outlook etc are the Shortcut folders) and the list of files and folders already added
in the Backup set if any demarcated by the | (or symbol).
3. VIEWER will read the whole list together, segregates drives, shortcut folders and
List of files/folders in the Backup set and displays them. The contents before OR
symbol are being considered as the list of Drives, Shortcut folders and the
contents after OR symbol are being considered as the list of files/folders in the
Backup set.
a. The data of Backup set from the HOST can be the actual Backup set
contents or just the string “NO_BACKUPSET_CONTENT” when no file
or folder has been added to the Backup set.
b. When Backup set content(s) (atleast a file or folder) exists, HOST will
also send the Next Scheduled Backup time (of the content(s) in the
Backup set) along with the Backup set contents demarcated by ~`

Below is the sample data from HOST to the VIEWER for 100 command

Desktop<C:\Documents and Settings\admin\Desktop\<1<0<0>My


Documents<C:\Documents and Settings\admin\My
Documents\<1<0<0>Favorites<C:\Documents and
Settings\admin\Favorites\<1<0<0>Outlook Express<C:\Documents and
Settings\admin\Local Settings\Application Data\Identities\{C6B13639-7484-401E-
878C-9D5EE378124C}\Microsoft\Outlook Express\<1<0<0>Microsoft
Outlook<C:\Documents and Settings\admin\Local Settings\Application
Data\Microsoft\Outlook\<1<0<0>C:\<C:\<1<0<0>|C:\Documents and

15
IDrive Web Based Backup Management -- Documentation

Settings\admin\Desktop\testing i drive\error.JPG< C:\Documents and


Settings\admin\Desktop\testing i drive\pass.JPG >~`02-19-2008 9:39:41

In the list of Drives and Shortcut folders, each element’s data is demarcated from the
other with > symbol.

Each element’s data comprises Name of the element, Path of the element, size of the
element, File/ folder flag and last modified date and time of the element in the mentioned
order. Each data is demarcated by the < symbol.

16
IDrive Web Based Backup Management -- Documentation

FUNCTIONALITY/ STEPS IN 101 COMMAND

101 command is to fetch the contents of a folder

Below are the steps in sending 101 command to HOST from VIEWER and receiving
the corresponding data from the HOST

1. First VIEWER sends 101 to the HOST of three-character length

NOTE: Just before sending the 101 command, VIEWER will check whether that
particular HOST connection (identified with the HOST DESCRIPTION) is still active or
not by using the script AuthenticateIDRIVE_web.cgi with action value = 3 and by
passing the required parameters like HOST DESCRIPTION, USERNAME_WEB
and PASSWORD.

If that particular HOST connection is active VIEWER will send the 101 command. If
NOT (may got disconnected due to net problem or host will disconnect after 5 minutes)
VIEWER will again try THRICE for a new HOST connection with a time gap of 5
seconds between each trial, if it gets it will continue with this new HOST connection
by sending 101 otherwise VIEWER will redirect user to an error page with the
message “There was a problem, please try again later”.

2. Second VIEWER will send the length of the Folder path ending with folder
name of which it needs the contents. The length of a folder path should be of
three-character length, which is predefined in the protocol. If the length of the
folder path is less than three-characters, it is made three-character in length by
appending with the required number of spaces.
For example, if the folder path is ‘c:\bangalore\Stream’, the length will be just 19
which is of length two character. We need to append one space to that to make it a
three-character word. So (19+ “ “) will be send to the host.

3. Third VIEWER will send the actual folder path to the HOST and goes to receive
mode.

NOTE: If any error occurs during the steps 2 and 3, VIEWER will redirect user to a page
with the message “There was a problem, please try again later”.

4. As it is PREDEFINED in the protocol, for 101 command HOST will send the
contents of the folder. Each element is separated by > symbol and each element’s
data will be separated by < symbol.

If any error occurs during step 4, user will be redirected to an error page with the message
“There was a problem, please try again later”.

17
IDrive Web Based Backup Management -- Documentation

FUNCTIONALITY/ STEPS IN 104 COMMAND


104 command is to update I.e. to send the schedule information to the HOST

Steps in Updating the Schedule information:

1. VIEWER will send the 104 command. By 104 command HOST understands
that it will receive the Schedule information.
2. VIEWER will send the Schedule information’s length.
3. VIEWER will send the Scheduler information. After sending scheduler
information VIEWER will go to receive mode and it reads FOUR bytes of
data from the HOST. That FOUR bytes data values can be either SUCC stands
for success or FAIL stands for failure.
In case of SUCC return value from the HOST, any of the following cases may happen
a. If ‘NO_SCHEDULE_CONTENT’ is a part of Schedule information,
user is redirected to Action page with the message ‘Currently you do
not have any default scheduled jobs for backup.’
b. If it is not Case ‘a’ and if schedule date time value in the Schedule
information is ‘NOSCHDATE’, user will be redirected to the Action
page with the message ‘Next default scheduled backup will occur on
CURRENT DATE AND TIME WHICH IS DISPLAYED USING THE
JAVASCRIPT METHOD dispDate()’.
c. If it is not either case ‘a’ or case ‘b’ then user is redirected to Action
page with the message ‘Next default scheduled backup will occur on --
User selected Date and Time’.
If FAIL is the return value from the HOST, then user is redirected to an error page.

If neither SUCC nor FAIL indicates some problem so VIEWER will try for the NEW
HOST connection THRICE and if it gets a new HOST connection the whole process
would be repeated from Step 1. If VIEWER cannot get a NEW HOST connection then
user will be redirected to an error page. After getting the NEW HOST connection again if
some error occurs, this time user will be redirected to an error page WITHOUT any trial
for the NEW HOST connection.

While updating the Scheduler information, under ‘Use the Recommended Backup
time for faster backups at off peak hours’ if we select the option ‘Use the
Recommended Backup time; then hour, mins and secs are set to 23, 0 and 0
respectively. If the option ‘Start the Backup Immediately’ is selected then hour, mins
and secs are set to 0, 0, and 0 respectively. Only in either of the cases ‘Use
Recommended Backup time’ and ‘Use Custom Backup Time’ we validate the user
selected Date value. All these are being done in the JavaScript method
validateDate().

18
IDrive Web Based Backup Management -- Documentation

FUNCTIONALITY/ STEPS IN 105 COMMAND


105 command is to fetch the backup set schedule information from the HOST

Displaying the Backup set Schedule information:


User CANNOT go to the Scheduler page if no file or folder is there in the Backup set. In
this case when user tries to go to the Scheduler page he is redirected back to the
IDBMAction.jsp page with the below message

Unable to schedule the backup job. Reason: There were no items selected as part of your
backup set. Please add contents to your backup set to begin scheduling the backup of the
same.

Steps in displaying the Scheduler information:

1. VIEWER sends 105 command to the HOST. By 105 command, HOST gets
that it needs to send the Scheduler information to the VIEWER. After sending
105 command, VIEWER goes to receive mode and reads the Scheduler
information using the method receiveDataFromHost of the bean
IDRemoteName.java by passing sslsocket connection as the parameter.

If the VIEWER receives the Scheduler information correctly it will display the respective
values accordingly, if any error comes during step 1 VIEWER will try THRICE for a
NEW HOST connection with a gap of 5 secs between each trial. (5 secs gap is to ensure
that HOST is given enough time to reconnect, if by any chance HOST gets disconnected)
If VIEWER gets a NEW connection, VIEWER will again repeat the WHOLE process
from step 1 otherwise will redirect user to an error page with the appropriate error
message. After getting the NEW connection, if any problem occurs, user will be
redirected to an error page WITH OUT trying for the HOST connection again.

If no Scheduler information is available, HOST will send NO_SCHEDULE_CONTENT.


In this case default values will be set to some of the fields. To set the default values,
we are calling a JavaScript method initializeDefaultValues() in the onLoad method.
And in the JSP code also default values will be set to some of the fields in this
scenario.

19
IDrive Web Based Backup Management -- Documentation

FUNCTIONALITY/ STEPS IN 106 COMMAND:


106 is to fetch a Folder’s details:

Steps in getting the size, number of files/folders in a folder.

1. Send command 106 from VIEWER to HOST.


2. Send the length of the folder’s path (path+name) to the HOST.
3. Send the actual path to the HOST. After sending the actual path, VIEWER will go
to the receiving mode.
4. Receive the folder’s details from the HOST using the method
receiveDataFromHost of the bean IBPRemoteName by passing the sslsocket as
parameter.
If any error occurs during any of the steps 1,2,3 and 4; VIEWER will try THRICE for a
NEW HOST connection with a gap of 5 secs between each trial. (5 secs gap is to ensure
that HOST is given enough time to reconnect, if by any chance HOST gets disconnected)
If VIEWER gets a NEW connection, VIEWER will again repeat the WHOLE process
from step 1 otherwise will redirect user to an error page with the appropriate error
message. After getting the NEW connection, if any problem occurs, user will be
redirected to an error page WITH OUT trying for the HOST connection again.

Example data for 106 command from the HOST: If the folder path and name is
c:\streamnet… the details from HOST for this folder can be “37 files,8 folders>112.18
KB”. The value before > symbol gives the number of files and folders and after the >
symbol gives the size.

20
IDrive Web Based Backup Management -- Documentation

FUNCTIONALITY/ STEPS IN 107 COMMAND


107 command is to fetch the Session log entries/files:

Steps in fetching the list of Session log files from the HOST

1. Send command 107 to HOST. As part of the protocol for 107 command, HOST
understands that it needs to send the list of Session log files. After sending 107
command VIEWER will go to receive mode.
2. VIEWER will read the Session log files type and name from the HOST using the
method receiveDataFromHost of the bean IBPRemoteName by passing the
sslsocket as parameter.
If any error occurs during the steps 1 and 2, VIEWER will try THRICE for a NEW
HOST connection with a gap of 5 secs between each trial. (5 secs gap is to ensure that
HOST is given enough time to reconnect, if by any chance HOST gets disconnected)
If VIEWER gets a NEW connection, VIEWER will again repeat the WHOLE process
from step 1 otherwise will redirect user to an error page with the appropriate error
message. After getting the NEW connection, if any problem occurs, user will be
redirected to an error page WITH OUT trying for the HOST connection again.

HOST will send the type and name of each Session log file. Each Session log file’s
details will be demarcated from the other with > symbol. Type and name of a particular
Session log file will be demarcated by <, I.e. value before < gives the type and value after
gives the name of a session log file.

Four types of Session log files are there, either 0 or 1 or 2 or 3 identify each type.
0– session log file for Delete operation
1— session log file for Scheduled Backup
2— session log file for Interactive Backup
3— session log file for Restore

In the session log files data from HOST, the value before ‘:’ gives the count of the session
log files and the value after ‘:’ gives the type and name of the session log files, each
session log file’s data is demarcated from the other with > symbol.

NOTE: HOST will send SESSIONS_LOG_NOTFOUND if there are NO session log


files.

Example data for 107 command from the HOST: If 107 is sent to the HOST the following
could be the data from the HOST.

3:0<02-25-2008 16-59-04>0<02-26-2008 10-13-57>1<02-25-2008 15-59-49


where the value before ‘:’ I.e. 3 gives the count of session log files. After ‘:’ gives the
type and name of the THREE Session log files.

21
IDrive Web Based Backup Management -- Documentation

FUNCTIONALITY/ STEPS IN 108 COMMAND


108 command is to download a Session log file’s content:

Steps in fetching/ downloading a particular Session log’s content from the HOST

1. VIEWER sends 108 command to HOST.


2. The length of the Session log file name is sent to the HOST
3. The name of the Session log file is sent to the HOST. After sending the name,
VIEWER goes to receive mode. VIEWER will receive the session log file’s
content BLOCK BY BLOCK from the HOST. First VIEWER reads the length
of the BLOCK ending with the ‘$’ and then that much data from the HOST.
The process repeats until HOST sends the length of the BLOCK as zero,
which indicates the end of the file.
If any error occurs during the step 1, VIEWER will try THRICE for a NEW HOST
connection with a gap of 5 secs between each trial. (5 secs gap is to ensure that HOST is
given enough time to reconnect, if by any chance HOST gets disconnected)
If VIEWER gets a NEW connection, VIEWER will again repeat the WHOLE process
from step 1 otherwise will redirect user to an error page with the appropriate error
message. After getting the NEW connection, if any problem occurs, user will be
redirected to an error page WITH OUT trying for the HOST connection again.

22
IDrive Web Based Backup Management -- Documentation

FUNCTIONALITY/ STEPS IN 109 COMMAND


109 command is to download the Complete log file’s content:

Steps in fetching/ downloading the complete log file’s content from the HOST

1. VIEWER sends 109 command to HOST. By 109 command, HOST gets


that it needs to send the complete log file’s content. After sending 109
command, VIEWER goes to receive mode. VIEWER will receive the
complete log file’s content BLOCK BY BLOCK from the HOST. First
VIEWER reads the length of the BLOCK ending with the ‘$’ and then that
much data from the HOST. The process repeats until HOST sends the
length of the BLOCK as zero, which indicates the end of the file.

If any error occurs during the step 1, VIEWER will try THRICE for a NEW HOST
connection with a gap of 5 secs between each trial. (5 secs gap is to ensure that HOST is
given enough time to reconnect, if by any chance HOST gets disconnected)
If VIEWER gets a NEW connection, VIEWER will again repeat the WHOLE process
from step 1 otherwise will redirect user to an error page with the appropriate error
message. After getting the NEW connection, if any problem occurs, user will be
redirected to an error page WITH OUT trying for the HOST connection again.

23

Вам также может понравиться