Project

General

Profile

Download (512 Bytes) Statistics
| Branch: | Tag: | Revision:
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 b8bfcce5 Scott Ullrich
	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 7ec0aeb1 Scott Ullrich
	echo "Restore of $1 complete."
15 979f35f3 Scott Ullrich
else
16 60e014fe Scott Ullrich
	echo " Error."
17
	echo "File not found or invalid backup file. Available backups:"
18 6cf2e475 Scott Ullrich
	ls -lah /root | grep backup | more
19 7ec0aeb1 Scott Ullrich
fi