Samba+LDAP server config files backup

Recently we built a new Samba+OPENLDAP PDC server to replace Window$ AD + File servers completely. I referred the below blog to build the GNU Debian Linux server after making necessary changes to configuration files of respective apps. This took 2-4 hours of strenuous effort.

# Paths of important config files
path[0]=’/etc/samba/smb.conf’
path[1]=’/etc/ldap/ldap.conf’
path[2]=’/etc/smbldap-tools/smbldap.conf’
path[3]=’/etc/smbldap-tools/smbldap_bind.conf’
path[4]=’/etc/logroate.d/logrorate.conf’
path[5]=’/etc/logrotate.d/samba.audit’
path[6]=’/etc/dhcp/dhcpd.conf’
path[7]=’/etc/libnss-ldap.conf’
path[8]=’/etc/pam_ldap.conf’
path[9]=’/etc/nsswitch.conf’

http://siddou.mynetgear.com/2013/06/install-sambaopenldap-on-debian-7-wheezy/

Now the biggest challenge is to backup these configuration files on regular intervals and backup them to cloud. The easiest and free-ist way to use the cloud based backup is dropbox. There are so many other products are available but I love Dropbox!

Being a lazy fellow its very difficult to do monotonous things by logging in and taking backup of config files day in day out. So the killer combination of lazy + script-writer, found a cool script which came to my rescue.

Dropbox uploader is pretty simple to use. Click the link to know the instructions to configure, run and schedule as cron job. I also referred another blog to integrate dropbox uploader with a shell script to zip and upload files to the cloud.

Here is the script for reference which I modified to my needs based on above mentioned blog and using dropbox uploader. I hope I can trust cloud backup better than pen drive or portable disk drives because of data availability and instant restore features.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s