blob: bc94f7e2db0cc94152f7795679ad54b112494212 (
plain) (
tree)
|
22
23
24
25
26
27
28
pre { line-height: 125%; }
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
span.linenos.special { color: #000000; background-color: #ffffc0; padd#!/bin/sh
echo -n "root directory you want backup (/mnt/): "
read ROOT_DIR
echo -n "where you want to save (/home/user): "
read DEST_DIR
echo -n "backup name (system_name): "
read BCK_NAME
echo $DES_DIR
echo $ROOT_DIR
tar --xattrs -zcpf $DEST_DIR/$BCK_NAME-`date '+%Y-%j-%H-%M-%S'`.tar.gz \
--directory=$ROOT_DIR \
--exclude=usr/ports \
--exclude=usr/src \
--exclude=var/run \
--exclude=var/lock \
--exclude=srv \
--exclude=mnt \
--exclude=home \
--exclude=dev \
--exclude=run \
--exclude=tmp \
--exclude=proc \
--exclude=sys .
|