Saturday, July 4, 2009

To take remote control of any user (Windows 2003 Server),

Step 1:
To take remote control of any user,
Login as Administrator to the server,
Right click on the Bottom tray and select “Task Manager”
This will start the “Task Manager”
Step 2:
Select “Users” Tab
This shows the users logged in at present.
Step 3:
Select the user > “Right click” > “Remote Control”

Permission from the user is required to take remote control (Permission can be modified as per needs i.e. we can take remote control with or without users permission), so in this scenario user (iamike) will get a message on his screen from administrator like this.

The user can accept the request by clicking “Yes” or dent by clicking “No”.

When the user accepts the request, administrator can have either “View the user’s session” (which allows administrator only to view what the user is doing on the other end) or “Interact with the session” (which allows administrator to take full control of the user’s session). This can be configured as per needs in the user properties,

In our example scenario the user accepts the request, this will allow administrator to take full control of the user session, which is similar to a remote desktop connection.

Remote control Configuration Steps:

To change the Remote Control properties of Users as per needs the steps as follows:

Login as Administrator

Start> Administrative tools > Active Directory Users and Computers (Select)

This Active Directory Users and Computers window will open

(1) Select the “Users” folder
(2) Select the users to configure Remote control properties.

“Right click”> Properties->

User properties window will open, select “Remote control” tab

(1) Configure as per needs
(2) Click “Apply”
(3) Click “Ok”.

The Remote control configuration for the user is done.

Share Local Printers to Remote machine

Step: 1
Go to start menu->run
Step 2:
Type mstsc
Step 3:
on the Remote Desktop Connection panel find the button "Options>>" and click on it
Step 4:
Find the tab "Local Resources"
Step 5:
Under "Local Resources" tab find and select the check box "Printers" and finally click on "Connect" button.

The local printer will be then shared to the Remote machine.

Wednesday, July 1, 2009

How to Automate Backups in Virtuozzo?

The virtual environments (VE’s) within Virtuozzo can be integrated with the Windows Scheduler to have automated backups performed.

By creating a simple batch file and integrating it with our Command Line Interface (CLI), the process can run at regular intervals on the server. Both full and incremental backups can be performed through the Windows Scheduler. The command used to backup a VE is called vzbackup. Examples of how to perform each type of backup is listed below.

While running this command, vzbackup does the following:

* It connects via SSH to the Source Node where the identified VE you wish to back up resides;
* It compresses the private area of the selected VE and its registry settings to a .zip formatted file;
* It connects via SSH to the Backup Node
* It transfers the compressed file to a special backup folder on the Backup Node


For example, to back up a single VE (101) hosted on a Hardware Node, the command below would back it up on that server.

vzbackup 101


To have the scripted backup create a backup on Host Node (10.10.40.100) and send it to the Backup Node (10.10.40.200), the following command would be used:

vzbackup 101 -A 10.10.40.200 –U Administrator –P passwd200


Where

-U is the Administrator login to the backup node. This option can be omitted – in this case vzagent0 password should be used with the –P option.
-P is the password of the Administrator ID to the specified server
-A is the IP address of the Backup Node to receive the backup

Note: In case you have the Service VE in the NAT mode you have to use the Node IP with –A option. In case you have Service VE without the NAT mode, you will use the Service VE IP with –A option.

In the example below, this backup script allows all the VE’s to be backed up at once:

Full backup:

@echo off

for /F "skip=3 usebackq tokens=*" %%i in (`cmd /c "vzlist -ao veid"`) do (cmd /c "vzbackup "%%i && echo VE ID %%i has been backed up!)


Incremental backup for Virtuozzo 3.5.1:

@echo off

for /F "skip=3 usebackq tokens=*" %%i in (`cmd /c "vzlist -ao veid"`) do (cmd /c "vzbackup -I "%%i && echo VE ID %%i has been backed up!)


Incremental backup for Virtuozzo 4.0:

@echo off

for /F "skip=3 usebackq tokens=*" %%i in (`cmd /c "vzlist -ao veid"`) do (cmd /c "vzbackup" %%i -I && echo VE ID %%i has been backed up!)



If you would like to keep a logging of backup process you can use the following script:

@echo Off >> logtime.log Time /tfor /F "skip=3 usebackq tokens=*" %%i in (`cmd /c "vzlist -ao veid"`) do (cmd /c logtime "Starting Full Local Backup of VPS %%i") && (cmd /c "vzbackup "%%i) && (cmd /c logtime "Full Local Backup Completed for VPS ID %%i")


Then you can see logtime.log file and check if backup was done successfully or not.

The following script creates report's files including number and type of backups for each container on the node:

for /F "skip=3 usebackq tokens=*" %%i in (`cmd /c "vzlist -ao veid"`) do echo ---------------- >> c:\Backup\BackupLogCT%%i.txt &time /T >> c:\Backup\BackupLogCT%%i.txt &date /T >> c:\Backup\BackupLogCT%%i.txt &vzbackup list %%i >> c:\Backup\BackupLogCT%%i.txt