Creating professional documentation with Linux tools

Title    Creating professional documentation with Linux tools
Date    2006.05.12 10:01
Author    Scott Nesbitt
Topic     

http://www.newsforge.com/article.pl?sid=06/05/05/1744245

From tips of the week, Linux Magazine

have used the following on a Suse SLES 9 system to make five exact copies of my original server.

  1. On the new server insert the Installation CD and boot to Rescue mode.
  2. Use root to login at the "Rescue" prompt.
  3. Run the following commands:
    Ê
    # ifconfig eth0 192.168.1.100 netmask 255.255.255.0 up
    # ping -c 192.168.1.101
    # netcat -l -p 9876 | dd of=/dev/cciss/c0d0

The ping command simply checks connectivity to existing server. Then, on the existing server…

  1. Login as root
  2. Run
    # dd if=/dev/cciss/c0d0 bs=4M |netcat 192.168.1.100 9876

Ubuntu | Automatic Update

While searching for ap-get upgrade on the Ubuntu Wiki, I found reference to automatically updating Ubuntu.  I created a script called autoupdt in /etc/cron.daily with the following:

#!/bin/bash
apt-get update
apt-get upgrade -y --force-yes
apt-get autoclean

 Note: I needed to add –force-yes for the upgrade to happen.

This script should keep the Ubuntu computer up to date. 

 
Posted in Ubuntu. 1 Comment »

System Backup

RESOURCES

Before I put the new backup server online, I need to back it up. Here's a couple of links that I'm looking into:

Backing up hard disks and partitions

backing up whole /root to tar file

Taring Howto

The idea is to backup the system and save it on the RAID5 Coraid appliance just in case the server died.

BACKING UP THE SYSTEM 

I created an exclusionsFile in /root that contained the following:

/dev
/mnt
/proc
/tmp
/home
/root
/sys
/usr/src
/var/cache
/var/log

Next, I issued the following command:

[root@backup ~]# tar -zPvcf myBackupServer.tar.gz -X /root/exclusionsFile /

BURNING THE ARCHIVE 

Using PSCP, I copied myBackupServer.tar.gz to a WinXP workstation.  I issued the following at a dos command prompt:

 >"C:\program files\putty\pscp.exe" -scp root@backup:/root/myBackupServer.tar.gz myBacku
pServer.tar.gz

Once the file was copied, I used Nero to burn it to a CDROM. 

Redirect syslogs to a Server

From RH Knowledgebase 

Issue: How do I redirect syslogs to a single server?

Resolution:

Edit the /etc/sysconfig/syslog file:

SYSLOGD_OPTIONS="-r -m 0"

The -r option allows the system to accept remote log messages.

After the file has been saved, the syslogd service has to be restarted:

# service syslog restart

Redirecting root’s email

Look in your aliases file (/etc/aliases for sendmail) near the
bottom.  There is probably a commented out dummy alias for root.
Uncomment it and put the desired recipient address there.  Then run

newaliases

You may also need to restart sendmail

service sendmail restart

Copying config.pl Files from Old Server

Instead of recreating the individual config.pl files for each PC to be backed up by BackupPC, I copied the files using scp.  An example of SCP can be found here.  Below are the commands that I issued:

[root@backup comp59]# scp root@photo.cvx.com:/mnt/vol1/backuppc/pc/comp59/config.pl config.pl
root@photo.cvx.com's password:
config.pl                                     100%  158     0.2KB/s   00:00
[root@backup comp59]# ls -al
total 12
drwxr-xr-x  2 backuppc backuppc 4096 May  3 12:36 .
drwxr-x—  4 backuppc backuppc 4096 May  3 12:24 ..
-rw-r–r–  1 root     root      158 May  3 12:36 config.pl

Next, change ownership of the config.pl file
[root@backup comp59]# chown backuppc:backuppc config.pl[root@backup comp59]# ls -al
total 12
drwxr-xr-x  2 backuppc backuppc 4096 May  3 12:36 .
drwxr-x—  4 backuppc backuppc 4096 May  3 12:24 ..
-rw-r–r–  1 backuppc backuppc  158 May  3 12:36 config.pl

Verify that the config.pl file is correct
[root@backup comp59]# cat config.pl
$Conf{XferMethod} = 'smb';
$Conf{XferLogLevel} = 3;
$Conf{SmbShareName} = 'CAM';
$Conf{SmbShareUserName} = 'xxxxxx';
$Conf{SmbSharePasswd} = 'xxxxxxx';

 Note: I've replaced the actual usernames and passwords with xxxxx(s) for security reasons.