File: sample-cron

package info (click to toggle)
flexbackup 1.2.1-6.3
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 424 kB
  • ctags: 113
  • sloc: perl: 4,445; sh: 402; makefile: 66
file content (24 lines) | stat: -rw-r--r-- 402 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh

#
# Sample cron script for incrementing backup levels, designed for
# placement into /etc/cron.daily
#
# Author: Brian Bassett <brianb@debian.org>
#

# Constants for days of the week
SUN=0
MON=1
TUE=2
WED=3
THU=4
FRI=5
SAT=6

# This is the day of the week that the Level 0 backup is made.
LVL0DAY=$TUE

# Backup!
/usr/bin/flexbackup -set all -level $(expr \( $(date +%w) - $LVL0DAY \) % 7)