Hi all,
I’ve been tinkering on a little something I would like to share with you all.
As a storage admin, backups are something I deal with quite alot, and is rather time-consuming. So I wrote a little script that recursively replicated from the "root" file system. But as time went on, other projects started to appear, like "time_machine", "public_storage" and so on, and of course my script didn’t replicate that. So I started thinking to myself "if I could wish for the perfect replication tool, what would that be like?"
Well..
- It would have to be able to do an infinite amount of filesystems.
- You should be able to choose per filesystem if it was to recurse that or not.
- It would be able to do both local and remote replication.
- I would like it if it also could just process one thing if I wanted it to, not just 10 things all the time.
- It would have to have some form of error checking and alert if something went wrong.
- It would be nice if it could know to make an incremental replication by itself, after the first time.
- It would be cool if you could replicate the same file system both locally and remote, for extra security.
- It would have to be made with security in mind.
- It would be able to clean and start over again if needed, with either all file systems or just one chosen.
- An install script would be nice.
- And a man-page.
And then I started doing it.
/usr/local/bin/replicate
replicate.tar.gz
I’m urging everyone to go through the code and see for yourselves how it looks and what it does. This is perhaps my second or third bigger script so I’m sure there are lots that could be done to make the code cleaner and more effective, but it does what it’s supposed to. Nothing more, nothing less, and I’m happy with that, for now
I have of course tested everything and it has worked flawlessly for me. All the same, I want as many people as possible testing this to find out anything in hiding.
I have about seven incremental remote jobs active right now, varying in size and amount of filesystems. Time from start to finish is about 5mins.
I you have lots of different machines with FreeBSD and ZFS, this will make your backuping alot easier.
/Sebulon
I’ve been tinkering on a little something I would like to share with you all.
As a storage admin, backups are something I deal with quite alot, and is rather time-consuming. So I wrote a little script that recursively replicated from the "root" file system. But as time went on, other projects started to appear, like "time_machine", "public_storage" and so on, and of course my script didn’t replicate that. So I started thinking to myself "if I could wish for the perfect replication tool, what would that be like?"
Well..
- It would have to be able to do an infinite amount of filesystems.
- You should be able to choose per filesystem if it was to recurse that or not.
- It would be able to do both local and remote replication.
- I would like it if it also could just process one thing if I wanted it to, not just 10 things all the time.
- It would have to have some form of error checking and alert if something went wrong.
- It would be nice if it could know to make an incremental replication by itself, after the first time.
- It would be cool if you could replicate the same file system both locally and remote, for extra security.
- It would have to be made with security in mind.
- It would be able to clean and start over again if needed, with either all file systems or just one chosen.
- An install script would be nice.
- And a man-page.
And then I started doing it.
/usr/local/bin/replicate
replicate.tar.gz
I’m urging everyone to go through the code and see for yourselves how it looks and what it does. This is perhaps my second or third bigger script so I’m sure there are lots that could be done to make the code cleaner and more effective, but it does what it’s supposed to. Nothing more, nothing less, and I’m happy with that, for now

I have of course tested everything and it has worked flawlessly for me. All the same, I want as many people as possible testing this to find out anything in hiding.
I have about seven incremental remote jobs active right now, varying in size and amount of filesystems. Time from start to finish is about 5mins.
I you have lots of different machines with FreeBSD and ZFS, this will make your backuping alot easier.
/Sebulon
Last edited: