...
Code Block |
---|
if [ -f /etc/bash_completion ]; then . /etc/bash_completion fi |
Document the work done
Well, that's kind of done but the editing interface of the wiki is not yet clear to me. Few shortcut:
- create a code box:
Code Block |
---|
{code 'Enter' |
- heading
Code Block |
---|
'ctrl' AND '1' XOR '2' XOR '3' |
- bullet list
Code Block |
---|
'shift' AND 'ctrl' AND 'b' |
- bold, underline, italic
Code Block |
---|
'ctrl' AND 'b'
'ctrl' AND 'u'
'ctrl' AND 'i' |
- save
Code Block |
---|
'ctrl' AND 's' |
Problems encountered after installation of debian
On start and halt
PROBLEM:
Code Block |
---|
exim paniclog /var/log/exim4/paniclog has non-zero size, mail system possibly broken |
SOLUTION:
Code Block |
---|
rm /var/log/exim4/paniclog |
need to start the network manually dhclient eth0
PROBLEM: when auto eth0 added to interfaces. Nfs interfaces gets stuck on boot.
SOLUTION: there was no 'auto lo' in /etc/network/interfaces. That added plus 'auto eth0' makes it work.
2. Assignement: Install a graphic interface on Debian installation
Install Debian with nothing else than the minimum (except for laptop)
Install XOrg
Code Block |
---|
apt-get install xorg |
Install Gnome
Code Block |
---|
apt-get install gnome-core |
to test the installation:
Code Block |
---|
starx |
change the resolution
Code Block |
---|
CTRL + ALT + '+' and CTRL + ALT + '-' |
screen the available resolution and change it
Code Block |
---|
xrandr -q
wrands -s resolution |
Install a display manager
Code Block |
---|
apt-get install gdm |
to start it
Code Block |
---|
gdm |
Install proprietary graphic card drivers:
If the kernel isn't compiled you need to install the kernel headers.
Check the kernel version
Code Block |
---|
uname -r |
Install the kernel header and link it to the linux file
Code Block |
---|
apt-get install linux-header-...
rm /usr/src/linux
ln -s /usr/src/linux-header-... /usr/src/linux |
Install the compilers
Code Block |
---|
apt-get install gcc g++ |
For the nvidia cards
Download the latest drivers from the nvidia website.
Stop gdm (might need a kill)
Code Block |
---|
/etc/init.d/gdm stop |
Install the driver
Code Block |
---|
sh NVIDIA... |
Don't download the kernel interface. Ask for a compilation of a new interface. Start xconfig ans restart gdm
Code Block |
---|
nvidia-xconfig
/etc/init.d/gdm restart |
To remove the logo in xorg.conf
Code Block |
---|
Option "NoLogo" "1" |
3. Assignment: Install Amanda & use it
Installation
create the directory structure for the folders to keep the backup
Code Block |
---|
mkdir /mnt/backup
#mount $DISK /mnt/backup/
mkdir /mnt/backup/vtapes /mnt/backup/holding /mnt/backup/holding/sam
chown backup.disk -R /mnt/backup/* |
create the config in /etc/amanda
...
3. Assignment: Install Amanda & use it
Installation
create the directory structure for the folders to keep the backup
Code Block |
---|
mkdir /mnt/backup
#mount $DISK /mnt/backup/
mkdir /mnt/backup/vtapes /mnt/backup/holding /mnt/backup/holding/sam
chown backup.disk -R /mnt/backup/* |
create the config in /etc/amanda
Code Block |
---|
mkdir /etc/amanda/sam-daily
touch /etc/amanda/sam-daily/amanda.conf
touch /etc/amanda/sam-daily/disklist
chown -R backup.backup /etc/amanda/sam-daily |
...
Code Block |
---|
org "sam"
mailto "root"
dumpcycle 7
runspercycle 5
tapecycle 30
dumpuser "backup"
tpchanger "chg-disk:/mnt/backup/vtapes/sam" # a virtual tape changer
#tapedev "/dev/nst0a" # the tapechanger
#tapedev "file:/mnt/backup/vtapes/offering"
changerfile "/var/lib/amanda/sam/changerfile"
labelstr "SAM.*"
label_new_tapes "SAM-%%"
tapetype DVD_SIZED_DISK
logdir "/var/lib/amanda/sam"
infofile "/var/lib/amanda/sam/curinfo"
indexdir "/var/lib/amanda/sam/index"
tapelist "/var/lib/amanda/sam/tapelist"
runtapes 5
#usetimestamps YES
dtimeout 3600 #seconds per client per dump
holdingdisk hd1 {
directory "/mnt/backup/holding/sam"
}
define dumptype comp-tar {
program "GNUTAR"
index yes
# record no # Important! avoid interfering with production runs
auth "bsdtcp"
}
define dumptype user-tar-span {
comp-tar
tape_splitsize 445 MB
auth "bsd"
#holdingdisk no
#split_diskbuffer "/mnt/holding/diskbuffer"
#fallback_splitsize 100M
comment "tape-spanning user partitions dumped with tar"
#exclude list "/etc/amanda/sam-daily/exclude-list"
}
define dumptype user-tar-span-home {
user-tar-span
comment "exluding all the unwanted things from /home"
# exclude list "/etc/amanda/sam-daily/exclude-list"
}
define tapetype DVD_SIZED_DISK {
filemark 4 KB
length 4482 MB
}
|
Code Block |
---|
echo debian-server-test-sam.bluelight.av backup amdump >> /var/backups/.amandahosts |
comment "exluding all the unwanted things from /home" # exclude list "/etc/amanda/sam-daily/ |
...
Code Block |
---|
debian-server-test-sam.bluelight.av /etc user-tar-span debian-server-test-sam.bluelight.av /var user-tar-span debian-server-test-sam.bluelight.av /root user-tar-span #debianexclude-list" } define tapetype DVD_SIZED_DISK { filemark 4 KB length 4482 MB } |
Code Block |
---|
echo debian-server-test-sam.bluelight.av backup /homeamdump >> /var/backups/.amandahosts |
/
...
etc/
...
as the backup user create all the virtual tapes and label them
Code Block |
---|
su backup -c "mkdir /mnt/backup/vtapes/sam"
for i in `seq 30`; do su backup -c "mkdir /mnt/backup/vtapes/sam/slot$i"; done
cd /mnt/backup/vtapes/sam && ln -s slot1 data |
create the tapelistamanda/sam-daily/disklist
Code Block |
---|
debian-server-test-sam.bluelight.av /etc user-tar-span
debian-server-test-sam.bluelight.av /var user-tar-span
debian-server-test-sam.bluelight.av /root user-tar-span
#debian-server-test-sam.bluelight.av /home/./all /home/ {
#user-tar-span
#exclude append "./media_no_backup"
#} |
as the backup user create all the virtual tapes and label them
Code Block |
---|
su backup -c "mkdir /varmnt/libbackup/amandavtapes/sam" su backup -c "touch /var/lib/amanda/sam/tapelist" |
label the tapes
Code Block |
---|
for i in `seq 30`; do su backup -c "/usr/sbin/amlabel sam-daily SAM-$i slot $i"; done |
/root/scripts/amanda-backup (after creating the folder)
Code Block |
---|
#!/bin/bash #mount ${DISK} /mnt/backup mkdir /mnt/backup/vtapes/sam/slot$i"; done cd /mnt/backup/vtapes/sam && ln -s slot1 data |
create the tapelist
Code Block |
---|
su backup -c "mkdir /usrvar/lib/sbinamanda/amdump sam-daily" #sleep 5 #umount /mnt/backup exit 0 |
Code Block |
---|
chmod +x /root/scripts/amanda-backup |
Recover (example for /etc)
In order to be able to run a recovery add the following line to /etc/amandahosts
Code Block |
---|
localhost root amindexd amidxtaped |
Go to the /etc folder
Code Block |
---|
amrecover sam-daily
listhost
sethost debian-server-test-sam.bluelight.av
listdisk
setdisk /etc
cd (folder name - ls works too)
add (name of the folder to recover or * for everything)
extract
exit |
...
su backup -c "touch /var/lib/amanda/sam/tapelist" |
label the tapes
Code Block |
---|
for i in `seq 30`; do su backup -c "/usr/sbin/amlabel sam-daily SAM-$i slot $i"; done |
/root/scripts/amanda-backup (after creating the folder)
Code Block |
---|
#!/bin/bash
#mount ${DISK} /mnt/backup
su backup -c "/usr/sbin/amdump sam-daily"
#sleep 5
#umount /mnt/backup
exit 0 |
Code Block |
---|
chmod +x /root/scripts/amanda-backup |
If the backup is restored from an external drive:
- make sure you have /etc/amanda and /var/lib/amanda on the external drive
- copy these 2 folders to the system to restore
- mount --bind the folder containing the vtapes to the folder on the system which supposed to have the vtapes (cf /etc/amanda/sam-daily/amanda.conf)
- follow the steps above
...