Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

Friday, March 14, 2008

Publish NTBackup log to Internal Web server

Creating a web based backup log for your NTBackup

NTBackup is a backup tools from microsoft, it's usually already installed on your windows
machine. After the backup finish NTBackup create a backupog, but the sucks thing is, that
we can not change the directory where NTBackup log reside. The backup log locate at
"C:\Documents and Settings\%USER%\Local Settings\Application Data\Microsoft\Windows NT\NTBackup\data"


At my office we use NTBackup to perform the system state backup, and the backup result need to be checked every morning.
Because the NTBackup run with administrator priveledges, So i need to create a way so other people can review the backup
file without login to that server. And the answer is to publish the backuplog to our internal web server.

To do that I use rsync to syncronize the backup log our Linux based web server. But there's a problem with the logfile,
after it was syncronized using rsync, the problem related with character encoding. If we open that backup log on firefox It will show funny characters (see image bellow)


To handle this problem I use python script to change the encoding.
This script also will run the rsync command and generate HTML file.
I will post this python script on my next blog.

To Configure rsync on windows see Brent Noris Homepage about installing rsync on windows
Here the part of my rsync configuration to point to the NTBackup Log directory
[backuplog]
path = C:/Documents and Settings/Administrator/Local Settings/Application Data/Microsoft/Windows NT/NTBackup/data
read only = yes

After you finish configure the rsync on your windows machine, edit your crontab, then add the python script to your crontab entry.

Sunday, October 28, 2007

Network Configuration File for RedHat/CentOS/Fedora

Because I work with my Linux Server directly from terminal, No fancy GUI. So I edit the network configuration
directly to ifcfg-ethx file (x = NIC Index), the file name depend to your device name, for example my Linux Server
Only have 1 network card so the configuration will had name ifcfg-eth0.
The configuration file located at /etc/sysconfig/network-scripts directory.

Here the the network file configuration when assign static IP
DEVICE=eth0
BOOTPROTO=none #If DHCP, then change to yes
HWADDR=00:00:1C:0A:AC:60 #MAC Addr
ONBOOT=yes #Set active on boot
TYPE=Ethernet
NETWORK=192.168.1.0
NETMASK=255.255.255.0
IPADDR=192.168.1.10
USERCTL=no #Set Yes if you want te ordinary user change the Network configuratin
IPV6INIT=no
PEERDNS=yes
GATEWAY=192.168.1.254



Here for DHCP
DEVICE=eth0
BOOTPROTO=dhcp
HWADDR=00:00:1C:0A:AC:60
ONBOOT=yes
TYPE=Ethernet
#NETWORK=192.168.1.0
#NETMASK=255.255.255.0
#IPADDR=192.168.1.10
#USERCTL=no
DHCP_HOSTNAME=komputerku.rumahku.local
#IPV6INIT=no
#PEERDNS=yes
#GATEWAY=172.17.8.254


And here for DNS servers
nameserver: 192.168.1.1
nameserver: 192.168.1.2.


For the DNS server, you can edit the file resolv.conf, you can find that at /etc directory.

When you finished, then restart the Network service, you can use command "/sbin/service network restart"
or "/etc/init.d/network restart". You must have root privilege to run both those command.

Wednesday, October 24, 2007

Gutsy Gibbon and Thinkpad T61

A Week before the final release, I donwload the rc version , and installed to my T61.

The first problem that I got with Gutsy is I need to set the SATA configuration to compatibility mode, instead AHCI.This make Vista run very slow. I still use windows because my job.

Beside that the Wireless NIC unstable, some time I can not change to other network.

Other than thoese 2 problems, Gutsy run well on my T61 , I hope there are solution for the AHCI problem. I hope.

Tuesday, February 20, 2007

Configure DHCP at Linux

I create a dhcp server with Linux I use CentOS 4.3 , I use Linux one because the dhcp under win 2003 not work , It always fail when try to get authorize from the Active directory at Holland.
To start we must check whether dhcpd installed at your linux machine.
- after you sure the dhcpd installed on your machine
- then run "
cp /usr/share/doc/dhcp-3.0.1/dhcpd.conf.sample /etc/dhcpd.conf" , this command will copy the example configuration file and replace the configuration file, this is ok because the original file contain nothing. just few lines of comment.
- after that edit the dhcpd.conf file, here the example of my configuration file :


ddns-update-style interim;
ignore client-updates;

subnet 192.168.1.0 netmask 255.255.255.0 {
# --- default gateway
option routers 192.168.1.254; #default-gateway
option subnet-mask 255.255.255.0; #netmask
option domain-name "tng.loc"; # domain-name
option domain-name-servers 192.168.1.1, 192.168.1.2; # DNS servers

range 192.168.1.40 192.168.1.1.239; # IP range
default-lease-time 21600;
max-lease-time 43200;

# Host with fixed address , this is actually the dhcp server address
host lnxsrv {
hardware ethernet 00:A0:C9:71:BD:45;
fixed-address 192.168.1.150;
}
}

- after that start the dhcpd service "/sbin/service dhcpd start"

This dhcp server work with windows client all the computer here use windows xp