about summary refs log blame commit diff stats
path: root/core/scripts/backup-system.sh
blob: 3fa1ab20c5400cd6701341c9cfc4b42c1b4a9d05 (plain) (tree)

























                                                                        
#!/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 .