[OpenIndiana-discuss] Is time-slider usable for most folks
Stephan Althaus
Stephan.Althaus at Duedinghausen.eu
Mon Nov 25 17:59:45 UTC 2024
On 11/25/24 17:08, Udo Grabowski (IMK) wrote:
> On 25-11-2024 15:10, hput wrote:
>> Trying to use the time slider... evertime I start it up and
>> authenticat, when I actuall try to set "custom" and adjust something
>> It freezes with a sign saying `configuring' but never finishes.
>>
>> It apparently cannot by killed with a kill -KILL command on the pid,
>> nor canceled by using the cancel or ok buttons
>>
>> What are people using to automate snapshots?
>>
>> Is the time-slider actually usable for most folks?
>
> Not using timeslider, but scripts called daily that roll our
> filesystem snapshots:
> ======================================================================
> #!/sbin/sh
> root=`/sbin/mount | nawk '/^\/ /{print $3;}'`
> fsys="$root"
> if [ -n "$1" ] ; then
> fsys=$1
> fi
> roll=3
> if [ -n "$2" ] ; then
> if (echo $2|grep '^[0-9]*$'>/dev/null); then
> roll=$2
> else
> echo "$2 is not a number."
> exit 1
> fi
> fi
> if (zfs list $fsys >/dev/null) ; then
> oldest=`zfs list -r -t snapshot $fsys| cut -d' ' -f1 | grep
> $fsys'@[0-9]\{4,4\}-[0-1][0-9]-[0-3][0-9]_[0-2][0-9]:[0-5][0-9]:[0-6][0-9]'|sort
> -r|tail +$roll`
> if [ -n "$oldest" ] ; then
> for z in $oldest; do zfs destroy $z ;done
> fi
> zfs snapshot $fsys@`date '+%F_%T`
> else
> echo "$fsys is not a ZFS filesystem, cannot snapshot."
> exit 1
> fi
> =====================================================================
> Called without arguments, it rolls whatever serves /, with argument 1
> a selected filesystem, argument 2 gives the amount of snapshots to
> retain (default 3).
>
> For /home and other special stuff, we use variants like this (which
> calls script above):
> =====================================================================
> #!/sbin/sh
> # keep a lot snapshots (called hourly)
> rolls=26
> # users to roll (almost)
> users=\(/`cat /local/users | sed 's% \{1,\}%/|/%g'`/\)
> # users that work at night want hourly snapshots then;
> # rolled in a different script with day+night cron schedule
> night='(/nightuser|/othernightuser)'
> # don't roll these
> exclude='(/Dontrollme|/Dontrollmetoo)'
> # next one line
> homes=`zfs list | grep -v @ | cut -d' ' -f1 |egrep "$users"|egrep -v
> $exclude|egrep -v $night`
> for h in $homes; do
> /imksun/bin_rootcsh/roll_snapshot $h $rolls
> done
> =====================================================================
>
> _______________________________________________
> openindiana-discuss mailing list
> openindiana-discuss at openindiana.org
> https://openindiana.org/mailman/listinfo/openindiana-discuss
Hi!
I'm using zrepl. May take an hour to set up first time (examples are
available).
It can not only create snapshots but create also backups accordingly..
Regards,
Stephan
More information about the openindiana-discuss
mailing list