#!/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=var/ports \ --exclude=var/run \ --exclude=usr/src \ --exclude=mnt \ --exclude=home \ --exclude=dev \ --exclude=run \ --exclude=tmp \ --exclude=proc \ --exclude=sys .