1 # -*- mode: sh; sh-basic-offset: 3; indent-tabs-mode: nil; -*-
2 # vim: set filetype=sh sw=3 sts=3 expandtab autoindent:
4 HELPERS="$HELPERS tar:tar_backup"
7 tar_title="Tar action wizard"
9 backupname=`hostname --fqdn`
11 inputBox "$tar_title" "When to run this action?" "everyday at 01"
13 tar_when_run="when = $REPLY"
15 inputBox "$tar_title" "\"Name\" of backups" "$backupname"
17 tar_backupname="backupname = $REPLY"
20 inputBox "$tar_title" "Directory where to store the backups" "/net/backups/$backupname"
22 tar_backupdir="backupdir = $REPLY"
24 radioBox "$tar_title" "Compression" \
25 "none" "do not filter trough" off \
26 "compress" "filter trough compress" off \
27 "gzip" "filter trough gzip" off \
28 "bzip" "filter trough bzip" on
31 tar_compress="compress = $REPLY "
34 while [ -z "$REPLY" ]; do
35 formBegin "$tar_title: Includes"
36 formItem "Include:" /etc
37 formItem "Include:" /home
38 formItem "Include:" /usr/local
48 [ $? = 0 ] || return 1
49 tar_includes="includes = "
51 [ -n "$i" ] && tar_includes="$tar_includes $i"
56 while [ -z "$REPLY" ]; do
57 formBegin "$tar_title: Excludes"
58 formItem "Exclude:" /tmp
59 formItem "Exclude:" /proc
60 formItem "Exclude:" /sys
61 formItem "Exclude:" /dev
62 formItem "Exclude:" /srv
63 formItem "Exclude:" /media
64 formItem "Exclude:" /misc
65 formItem "Exclude:" /net
66 formItem "Exclude:" /selinux
70 [ $? = 0 ] || return 1
71 tar_excludes="excludes = "
73 [ -n "$i" ] && tar_excludes="$tar_excludes $i"
78 get_next_filename $configdirectory/10.tar
79 cat > $next_filename <<EOF
87 # tar binary - have to be GNU tar
90 #DATEFORMAT "%Y.%m.%d-%H%M"
93 chmod 600 $next_filename