1 # -*- mode: sh; sh-basic-offset: 3; indent-tabs-mode: nil; -*-
3 HELPERS="$HELPERS tar:tar_backup"
6 tar_title="Tar action wizard"
8 backupname=`hostname --fqdn`
10 inputBox "$tar_title" "When to run this action?" "everyday at 01"
12 tar_when_run="when = $REPLY"
14 inputBox "$tar_title" "\"Name\" of backups" "$backupname"
16 tar_backupname="backupname = $REPLY"
19 inputBox "$tar_title" "Directory where to store the backups" "/net/backups/$backupname"
21 tar_backupdir="backupdir = $REPLY"
23 radioBox "$tar_title" "Compression" \
24 "none" "do not filter trough" off \
25 "compress" "filter trough compress" off \
26 "gzip" "filter trough gzip" off \
27 "bzip" "filter trough bzip" on
30 tar_compress="compress = $REPLY "
33 while [ -z "$REPLY" ]; do
34 formBegin "$tar_title: Includes"
35 formItem "Include:" /etc
36 formItem "Include:" /home
37 formItem "Include:" /usr/local
47 [ $? = 0 ] || return 1
48 tar_includes="includes = "
50 [ -n "$i" ] && tar_includes="$tar_includes $i"
55 while [ -z "$REPLY" ]; do
56 formBegin "$tar_title: Excludes"
57 formItem "Exclude:" /tmp
58 formItem "Exclude:" /proc
59 formItem "Exclude:" /sys
60 formItem "Exclude:" /dev
61 formItem "Exclude:" /srv
62 formItem "Exclude:" /media
63 formItem "Exclude:" /misc
64 formItem "Exclude:" /net
65 formItem "Exclude:" /selinux
69 [ $? = 0 ] || return 1
70 tar_excludes="excludes = "
72 [ -n "$i" ] && tar_excludes="$tar_excludes $i"
77 get_next_filename $configdirectory/10.tar
78 cat > $next_filename <<EOF
86 # tar binary - have to be GNU tar
89 #DATEFORMAT "%Y.%m.%d-%H%M"
92 chmod 600 $next_filename