about summary refs log tree commit diff stats
path: root/core/scripts/backup-system.sh
blob: 854a2210f054ea43b31b7208bb11085c2d5ba61d (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
#!/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 $DES_DIR
echo $ROOT_DIR

tar --xattrs -zcpf $DEST_DIR/system-backup-`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 .