Projet

Général

Profil

Télécharger (512 octets) Statistiques
| Branche: | Tag: | Révision:

univnautes / etc / rc.restore_full_backup @ master

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."
15
else
16
	echo " Error."
17
	echo "File not found or invalid backup file. Available backups:"
18
	ls -lah /root | grep backup | more
19
fi
(89-89/103)