All pastes #417514 Raw Edit

Something

public text v1 · immutable
#417514 ·published 2007-03-30 22:27 UTC
rendered paste body
#!/bin/sh -

swap_mount=$HOME/opennms/trunk
directories="workspace opennms"
zfs_fs=nerdy/eclipse

local_mountpoint="`/usr/sbin/zfs get -H -o value mountpoint $zfs_fs`"
if [ $? -ne 0 ]; then
    echo "$0: could not get mount point for $zfs_fs" >&2
    exit 1
fi

for directory in $directories; do
    echo "---> Starting $directory"
    rsync -av --delete $swap_mount/$directory/ $local_mountpoint/$directory/ \
        || exit 1
done

sudo snapshot $zfs_fs