SearchFAQMemberlist Log in
Reply to topic Page 1 of 1
Author Message
Post rsnapshot/utils,NONE 
Update of /cvsroot/rsnapshot/rsnapshot/utils
In directory

Added Files:
Log Message:
New script creates a parallel directory hierarchy
arranged like backup_point/backup_name instead of backup_name/backup_point
with a combination of directories for backup points and symlinks for the
backup names

--- NEW FILE: ---

# $Id:,v 1.1 2007/04/12 16:51:58 drhyde Exp $

# This script takes one parameter, which should be your rsnapshot config
# file. It will parse that file to find your snapshot_root, backup points,
# and interval/retain values, and will create from those an inverted
# directory structure of backup points containing daily.{0,1,2,3} etc
# symlinks. Run it from a cron job to keep that structure up to date.
# There is minimal^Wno error checking, and the parsing is totally brain-
# dead.

SNAPSHOT_ROOT=`grep ^snapshot_root $1|awk '{print \$2}'`
BACKUPS=`grep ^backup $1|awk '{print \$3}'`
INTERVALS=`grep -E '^(interval|retain)' $1|awk '{print \$2}'`

for i in $BACKUPS; do
mkdir $i
for j in $INTERVALS; do
HOWMANY=`grep -E ^\(interval\|retain\).$j $1|awk '{print \$3}'`
while [[ $COUNT != $HOWMANY ]]; do
COUNT=$(($COUNT + 1))

Take Surveys. Earn Cash. Influence the Future of IT
Join's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
rsnapshot-discuss mailing list
rsnapshot-discuss < at >

Display posts from previous:
Reply to topic Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Magic SEO URL for phpBB