Caesar
Contributor
- Joined
- Feb 22, 2013
- Messages
- 114
I saw cyberjock's post for backing up the config file every night but my config does not change often enough to back it up daily so I thought to my self that it would be nice if freenas had a feature to backup the config to a location of my choice when I made a change. So I wrote this python script to do just that.
Basically this script will copy freenas-v1.db file to a folder of your choice and then will not make another copy unless a change is found in the freenas-v1.db file.
This is the first time I have ever created a python script so be nice if I did not create the most efficient code ever. Also I have done very limited testing of this script so there maybe a bug or two. Just let me know and I will do what I can to fix them.
[Update]
I found a bug in the script so I have moved this script to github so I can make changes and don't have to keep updating this post.
https://github.com/ebright/Freenas-bk-cfg
Basically this script will copy freenas-v1.db file to a folder of your choice and then will not make another copy unless a change is found in the freenas-v1.db file.
This is the first time I have ever created a python script so be nice if I did not create the most efficient code ever. Also I have done very limited testing of this script so there maybe a bug or two. Just let me know and I will do what I can to fix them.
[Update]
I found a bug in the script so I have moved this script to github so I can make changes and don't have to keep updating this post.
https://github.com/ebright/Freenas-bk-cfg