On Sat, Mar 28, 2009 at 11:20 AM, Fajar A. Nugraha <fa...@fajar.net> wrote: > I have a backup system using zfs send/receive (I know there are pros > and cons to that, but it's suitable for what I need). > > What I have now is a script which runs daily, do zfs send, compress > and write it to a file, then transfer it with ftp to a remote host. It > does full backup every 1st, and do incremental (with 1st as reference) > after that. It works, but not quite resource-effective (for example, > the full backup every month, and the big size of incremental backup on > 30th). > > I'm thinking of changing it to a script which can automate replication > of a zfs pool or filesystem via zfs send/receive to a remote host (via > ssh or whatever). It should be smart enough to choose between full and > incremental, and choose which snapshot to base the incremental stream > from (in case a scheduled incremental is missed), preferably able to > use snapshots created by zfs/auto-snapshot smf service. > > To prevent re-inventing the wheel, does such script exists already? > I prever not to use AVS as I can't use on existing zfs pool. > > Regards, > > Fajar > _______________________________________________ > zfs-discuss mailing list > zfs-discuss@opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss >
The ZFS automatic snapshot tools have the ability to execute any command after a snapshot has taken place, such as ZFS send. However, I ran into some issues, as it wasn't strictly designed for that and didn't handle errors very well. I have since modified some scripts out there, and rolled them into my own, you can see it here at pastebin.com: http://pastebin.com/m3871e478 Inspiration: http://blogs.sun.com/constantin/entry/zfs_replicator_script_new_edition http://blogs.sun.com/timf/en_IE/entry/zfs_automatic_snapshots_in_nv Those are some good resources, from that, you can make something work that is tailored to your environment. -- Brent Jones br...@servuhome.net _______________________________________________ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss