1 |
7ec0aeb1
|
Scott Ullrich
|
#!/bin/sh
|
2 |
|
|
|
3 |
60e014fe
|
Scott Ullrich
|
echo -n "Checking..."
|
4 |
979f35f3
|
Scott Ullrich
|
if [ `tar tzPf $1 /etc/rc 2>/dev/null` ]; then
|
5 |
60e014fe
|
Scott Ullrich
|
echo " Backup file looks OK."
|
6 |
1f06d217
|
Scott Ullrich
|
echo "One moment, restoring ${1}..."
|
7 |
60e014fe
|
Scott Ullrich
|
tar xzPfU $1 -C / 2>/var/etc/restore_log.txt
|
8 |
7ec0aeb1
|
Scott Ullrich
|
echo "Restore of $1 complete."
|
9 |
979f35f3
|
Scott Ullrich
|
else
|
10 |
60e014fe
|
Scott Ullrich
|
echo " Error."
|
11 |
|
|
echo "File not found or invalid backup file. Available backups:"
|
12 |
6cf2e475
|
Scott Ullrich
|
ls -lah /root | grep backup | more
|
13 |
7ec0aeb1
|
Scott Ullrich
|
fi
|