about summary refs log tree commit diff stats
path: root/core/scripts/backup-system.sh
blob: 3fa1ab20c5400cd6701341c9cfc4b42c1b4a9d05 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/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 .