#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
# Load library routines
SYSCONFDIR=${SYSCONFDIR-@sysconfdir@}
-. ${LIBPATH-@libexecdir@}/backup.sh
+. ${LIBDIR-@libexecdir@}/backup.sh
usage() {
cat - <<EOF
usage: $PROGNAME [OPTIONS] [PATTERN [PATTERN...]]
Options are:
- -l, --level=LEVEL Start restoring from backup level LEVEL (default $DUMP_LEVEL).
+ -a, --all Restore all filesystems.
+ -l, --level=LEVEL Start restoring from the given backup LEVEL
+ (default $DUMP_LEVEL).
-v, --verbose[=LEVEL] Set verbosity level. Default 100.
Informational options:
optarg=$opt
fi
case $option in
+ -a|--a|--al|--all)
+ RESTORE_ALL=1
+ ;;
--l=*|--le=*|--lev=*|--leve=*|--level=*)
DUMP_LEVEL=$optarg
;;
esac
done
+if [ -z "$RESTORE_ALL" ]; then
+ if [ -z "$PATTERN" ]; then
+ usage
+ exit;
+ fi
+fi
+
init_restore
cat > $LOGFILE <<EOF
This file contains any messages produced by $PROGNAME.
restore_fs()
{
fs="`echo \"${1}\" | sed -e 's/^.*://'`"
+ fs=`root_fs $fs`
fsname="`echo \"${1}\" | sed -e 's/\//:/g'`"
remotehost="`expr \"${1}\" : '\([^/][^/]*\):.*'`"
if [ -z "$remotehost" ]; then
LABEL="`print_level $level` backup of ${fs} on ${remotehost} at ${DATE}"
${RESTORE_BEGIN-:} $level $remotehost $fs $fsname
backup_host ${remotehost} \
- "--listed=`level_log_name $fs $level`" \
+ "--listed=\"$FILE\"" \
"--label=\"$LABEL\"" \
- -C ${ROOT_FS-/}$fs
+ -C $fs
${RESTORE_END-:} $level $remotehost $fs $fsname
done
}
LABEL="`print_level $level` backup of miscellaneous files at ${DATE}"
${RESTORE_BEGIN-:} $level $localhost MISC MISC
backup_host ${localhost} \
- "--listed=`level_log_name MISC $level`" \
+ "--listed=\"$FILE\"" \
"--label=\"$LABEL\"" \
-C ${ROOT_FS-/} $@
${RESTORE_END-:} $level $localhost MISC MISC
-
\ No newline at end of file
+