Project

General

Profile

Download (542 Bytes) Statistics
| Branch: | Tag: | Revision:
1
#!/bin/sh
2

    
3
echo -n "Checking..."
4
if [ `tar tzPf $1 /etc/rc 2>/dev/null` ]; then
5
	echo " Backup file looks OK."
6
	echo "One moment, restoring ${1}..."
7
	if [ -f /tmp/do_not_restore_config.xml ]; then
8
		EXCLUDE="--exclude /cf/conf/config.xml"
9
		rm /tmp/do_not_restore_config.xml
10
	else
11
		EXCLUDE=""
12
	fi
13
	tar xzPfU $1 $EXCLUDE -C / 2>/var/etc/restore_log.txt
14
	echo "Restore of $1 complete. Rebooting"
15
        /sbin/reboot
16
else
17
	echo " Error."
18
	echo "File not found or invalid backup file. Available backups:"
19
	ls -lah /root | grep backup | more
20
fi
(91-91/105)