Thuis Pagina
Je hebt nog geen geldig gebruiker voor deze site !
aub gebruik Profile - Registreer voor een nieuwe registratie !
aub gebruik Profile - Log in voor een bestaand gebruiker !
#!/bin/bash # backup op myssd2_data LD="/myssd2_data/" DATUM="$(date +%Y%m%d)" LF=backupdisk_$(date +%Y%m%d).out RES=1 # only run as root if [ "$(id -u)" != '0' ] then echo "Deze bash script moet opgestart worden met root rechten" exit $RES fi echo "====== start backupdisk_sets ======" echo "====== start backupdisk_sets ======" >>$LD$LF echo "-----------------------------------" >>$LD$LF echo " inxi " echo " inxi " >>$LD$LF echo "------" >>$LD$LF /usr/bin/inxi -FGISZMxxxpu /usr/bin/inxi -FGISZMxxxpu >>$LD$LF echo " lsblk " echo " lsblk " >>$LD$LF echo "-------" >>$LD$LF lsblk lsblk >>$LD$LF echo " gdisk /dev/sda " echo " gdisk /dev/sda " >>$LD$LF echo "----------------" >>$LD$LF gdisk -l /dev/sda gdisk -l /dev/sda >>$LD$LF echo " parted /dev/sda " echo " parted /dev/sda " >>$LD$LF parted /dev/sda print parted /dev/sda print >>$LD$LF echo " gdisk /dev/sdb " echo " gdisk /dev/sdb " >>$LD$LF echo "----------------" >>$LD$LF gdisk -l /dev/sdb gdisk -l /dev/sdb >>$LD$LF echo " parted /dev/sdb " echo " parted /dev/sdb " >>$LD$LF echo "----------------" >>$LD$LF parted /dev/sdb print parted /dev/sdb print >>$LD$LF echo " blkid " echo " blkid " >>$LD$LF echo "-------" >>$LD$LF blkid blkid >>$LD$LF echo " pvs " echo " pvs " >>$LD$LF echo "-----" >>$LD$LF pvs pvs >>$LD$LF echo " vgs " echo " vgs " >>$LD$LF echo "-----" >>$LD$LF vgs vgs >>$LD$LF echo " lvs " echo " lvs " >>$LD$LF echo "-----" >>$LD$LF lvs lvs >>$LD$LF lvs -a -o +devices lvs -a -o +devices >>$LD$LF echo "eerste 2047 sectoren " echo "eerste 2047 sectoren " >>$LD$LF echo "---------------------" >>$LD$LF echo "dd if=/dev/sda of=sda2047.mbr bs=512 count=2047" echo "dd if=/dev/sda of=sda2047.mbr bs=512 count=2047" >>$LD$LF dd if=/dev/sda of=/myssd2_data/sda2047_${DATUM}.mbr bs=512 count=2047 echo "dd if=/dev/sdb of=sdb2047.mbr bs=512 count=2047" echo "dd if=/dev/sdb of=sdb2047.mbr bs=512 count=2047" >>$LD$LF dd if=/dev/sdb of=/myssd2_data/sdb2047_${DATUM}.mbr bs=512 count=2047 # echo "backup vgs" # echo "backup vgs" >>$LD$LF # echo "----------" >>$LD$LF # echo "dd if=/dev/mydell of=mydell.dd" # echo "dd if=/dev/mydell of=mydell.dd >>$LD$LF # dd if=/dev/mydell of=mydell_${DATUM}.dd # echo "dd if=/dev/myssd of=myssd.dd" # echo "dd if=/dev/myssd of=myssd.dd >>$LD$LF # dd if=/dev/myssd of=myssd_${DATUM}.dd sync RES=0 exit $RES
Sorry, er zijn nog geen commentaren voor deze Taak !
Lijst taken Nieuwe Taak Nieuwe Commentaar