dumpster (314B) [raw]
1 #!/bin/sh 2 # dumpster -- taking out the garbash with dump(8) 3 4 # %u is 1=mon 7=sun (unless given in ARGV) 5 LVL=${1:-"$(date +%u)"} 6 BAKDIR="/bak/$(date +%F)_$LVL" 7 8 mkdir -p "$BAKDIR" 9 dump -$LVL -auf "$BAKDIR/root.dump.$LVL" / 10 dump -$LVL -auf "$BAKDIR/home.dump.$LVL" /home 11 dump -$LVL -auf "$BAKDIR/var.dump.$LVL" /var