#!/bin/sh cd /var/www/ntpstats/ || exit 1 # typical dump files are less than 256kB, often less than 128kB # max archive files = 24 + 31 + 12 = 67 # total archived data: 256k * 67 = 16.8MB cp -a ntp_stats.dump archive/daily/`date +%H00`_ntp_stats.dump cp -a ntp_stats.dump archive/monthly/`date +%d`_ntp_stats.dump cp -a ntp_stats.dump archive/yearly/`date +%m`_ntp_stats.dump