Work IT catching up with home IT
By user12625760 on Apr 03, 2008
At long last my home directory in the Office has caught up with my home directory at home and the one on my laptop and now lives on ZFS. Even better the admins have delegated snapshot privileges for my home directory to me. So now I have a scrip that snapshots my home directory every time I insert my smart card:
#!/bin/ksh -p now=$(date +%F-%T) exec mkdir $HOME/.zfs/snapshot/user_snap_$now
This is then called using utaction:
utaction -c ~/bin/sh/snap
Which is in turn started automatically via the session magic that gnome does (Preferences->Sessions->Start Up Programs).
You will notice that I use mkdir to create the snapshot this is great as it allows me to run the script on an NFS client but does prevent me from doing a recursive snapshot which if I had other file systems I would like.
Update. I just realised that my nautilus script is now useful at work. Cool.