-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathetc-crontab
More file actions
45 lines (34 loc) · 2.46 KB
/
Copy pathetc-crontab
File metadata and controls
45 lines (34 loc) · 2.46 KB
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# /etc/crontab: system-wide crontab
# additional Pulsechain related cronjobs, add to your /etc/crontab
# Change path of scripts if necessary
# Weekly firewall restart mid of the week at 12pm
0 12 * * 3 root /shell/firewall.sh -restart >/dev/null 2>&1
# Deactivate firewall for network rules testing/bug-fixing every 3min (only uncomment for testing purposes)
# */3 * * * * root /shell/firewall.sh -stop
# hour-meter cronjob below (added by hm installation)
0-59/15 * * * * root /usr/bin/hm -c
# daily pulsechain bin-folder backuprotation
# You can also use rsync365.sh for other path backups. I do NOT recommend to backup the pulsechain datadir!
# DO NOT backup the pulsechain datadir using this way! Use a COW filesystem snapshots e.g. ZFS to backup the datadir
0 0 * * * root /shell/rsync365.sh /mnt/pulsechain/prod/bin /mnt/backup/bin.rsync >/dev/null 2>&1
# Create ZFS dataset recovery snapshots of /mnt/pulsechain/prod every 10min and remove snapshots older than 48h
# ONLY NEEDED IF YOU USE A ZFS FILESYSTEM
*/10 * * * * root /sbin/zfs snapshot pool0/pulsechain@mnt-zpool0-pulsechain-prod_$(date +\%Y\%m\%d-\%H\%M\%S).snapshot >/dev/null 2>&1
4 0 * * * root /mnt/pulsechain/prod/bin/zfs-snapshot-purge.sh >/dev/null 2>&1
# daily creation of pulsechain ZFS prod clone and rsync to /mnt/backup/ followed by cleanup of ZFS snapshot and ZFS snapshot clone
# ONLY NEEDED IF YOU USE A ZFS FILESYSTEM
# 0 0 * * * root /mnt/pulsechain/prod/bin/prod-bkp-clone.sh >/dev/null 2>&1
# Create ZFS dataset recovery snapshots of /mnt/pulsechain/prod every 10min and remove snapshots older than 48h
# ONLY NEEDED IF YOU USE A ZFS FILESYSTEM
# 0 * * * * root /sbin/zfs snapshot pool0/pulsechain@mnt-zpool0-pulsechain-prod_$(date +\%Y\%m\%d-\%H\%M\%S).snapshot >/dev/null 2>&1
# 0 2 * * * root /mnt/pulsechain/prod/bin/zfs-snapshot-purge.sh >/dev/null 2>&1
# Weekly ZFS integrity check (every month on the 1st day)
# ONLY NEEDED IF YOU USE A ZFS FILESYSTEM
# 0 2 1 * * root /usr/sbin/zpool scrub pool0 >/dev/null 2>&1
# Hourly Pulsechain disk-size log
0 * * * * root echo -n $(date '+\%Y-\%m-\%d_\%H:\%M:\%S: ') >> /var/log/pulsechain-df.log ; du -hs /mnt/pulsechain/prod/execution/ | awk '{ printf(" \%s size is \%s. \n", $2, $1) }' >> /var/log/pulsechain-df.log
# Daily IP watchlog
0 0 * * * root echo "`date '+\%Y-\%m-\%d_\%H:\%M:\%S'`: $(/usr/bin/curl -s ident.me)" >> /var/log/ip.log
# Regular daily md5 filesystrem integrity check
# create filesystem integrity database using 'ic.sh -c'
0 2 * * * root /shell/ic.sh -i