It's a simple file or directory rotation script. Just set up the 2 variables (OBJECT and ROTATE) and run the script.
OBJECT="backup.tar.bz2" ROTATE=7 bash manualrotate.sh
[ `id -u` -ne 0 ] && [ -z "$TMUX" ] && tmux new-session -AD -s $HOSTNAME && exit 0 |