Linuxhotel Wiki

Wie ging das nochmal?

Benutzer-Werkzeuge

Webseiten-Werkzeuge


lpi2:start

Dies ist eine alte Version des Dokuments!


Exam 201

Topic 203: Filesystem and Devices

203.2 Maintaining a Linux filesystem

xfsdump & xfsrestore

Logical Volumes anlegen:

pvcreate  /dev/sda2
vgextend vg_notebook23 /dev/sda2
lvcreate --name xfs_production --size 1G vg_centos6
lvcreate --name xfs_backup --size 2G vg_centos6

XFS Dateisysteme anlegen und mounten:

mkfs.xfs /dev/vg_centos6/xfs_production
mkfs.xfs /dev/vg_centos6/xfs_backup
mkdir /mnt/xfs_production
mkdir /mnt/xfs_backup
mount /dev/vg_centos6/xfs_production /mnt/xfs_production
mount /dev/vg_centos6/xfs_backup /mnt/xfs_backup

Beispiel-Daten kopieren:

du -sh /usr/share/doc
cp -a /usr/share/doc/. /mnt/xfs_production/

Backup anlegen:

year=$(date '+%G')
week=$(date '+%V')
day=$(date '+%A')
mkdir -p /mnt/xfs_backup/$year/KW$week
xfsdump -f /mnt/xfs_backup/$year/KW$week/0.dump -l 0 -p 1 -L KW$week -M Sonntag /mnt/xfs_production

Daten verändern:

echo 1 > /mnt/xfs_production/1.txt

Inkrementelles Backup anlegen:

lpi2/start.1347366507.txt.gz · Zuletzt geändert: 2012/09/11 12:28 von ingo_wichmann