evobackup/install/etc/evobackup/actions.d/99_system_info
2014-01-30 11:31:04 +01:00

26 lines
748 B
Bash
Executable file

#!/bin/sh
# Get system informations.
# Extract MBR / table partitions.
# dd if=/dev/sda of=/home/backup/MBR bs=512 count=1 2>&1 | egrep -v "(records
# in|records out|512 bytes)"
# sfdisk -d /dev/sda > /home/backup/partitions 2>&1 | egrep -v "(Warning:
#extended partition does not start at a cylinder boundary|DOS and Linux will
# interpret the contents differently)"
# Get routes
for addr in 8.8.8.8 backup.evolix.net www.evolix.fr www.evolix.net; do
mtr -r $addr > /home/backup/mtr-${addr}
traceroute -n $addr > /home/backup/traceroute-${addr}
done
# Process list.
ps auwwwx > /home/backup/process.txt
# Network connections list.
netstat -taupen > /home/backup/netstat.txt
# Packages list.
dpkg -l > /home/backup/packages.txt
exit 0