nsbin/backup_to_eiche.nfs
Nico Schottelius df2daf524d init
Signed-off-by: Nico Schottelius <nico@manager.schottelius.org>
2017-07-19 17:15:41 +02:00

18 lines
366 B
Text

NEWROOT=/mnt/eiche
DATA_DIRS="bin boot etc home lib opt root sbin tmp usr var"
SCRIPTS="/root/scripts/to_eiche"
# display how long we backup
date
for script in $SCRIPTS; do
$script
done
# create empty dirs
mkdir -p $NEWROOT/dev $NEWROOT/proc $NEWROOT/mnt
for a in /mnt/*; do mkdir -p $NEWROOT/$a; done
cd /
tar cf - $DATA_DIRS | ( cd $NEWROOT; tar xf - )
date