Thursday, 28 January 2016

Downgrade Domain Controller Functional Level


1. Import the AD module
                      Import-Module -Name ActiveDirectory

2. Check the Forest Functional level of your Active Directory
                      Get-ADForest | Format-Table Name , ForestMode  

3. Lower the Forest Functional Level and then the Domain Functional Level
                      Set-ADForestMode –Identity “ansarsoft.com” –ForestMode Windows2008Forest 
                      Set-ADDomainMode –Identity “ansarsoft.com” –DomainMode Windows2008Domain

4. To Confirm your Forest Functional level of your Active Directory
                      Get-ADForest | Format-Table Name , ForestMode

Monday, 11 January 2016

Samba 4, BTRFS (Volume Shadow Copy), Ubuntu

Download Ubuntu Server :
         http://www.ubuntu.com/download/server

Download Latest Stable Version Samba 4.
         https://download.samba.org/pub/samba/stable/

Start Install/Configure Ubuntu Server
         Configure server as per normal installation. In my virtual environment, I have created 2 virtual harddisk. 1 for file system, and the other 1 as keeping data.
         Root (/) and swap, I have configure on the first hard disk with  root ext4 format.
          The second disk, I have configured as btrfs format with mount mount /home. Acatually, we can configure this partition later, but to make it easy, I configure it as is.


smb.conf configuration

[sharename]
path = /home/data/location
        read only = No
        vfs objects = shadow_copy2
        shadow:format = @GMT-%Y.%m.%d-%H.%M.%S
        shadow:sort = desc
        shadow:snapdir = .snapshots


btrfs subvolume snapshot -r /home/data/location/ /home/data/location/.snapshots/@GMT-`date +%Y.%m.%d-%H.%M.%S` 


Reference :
https://btrfs.wiki.kernel.org/index.php/FAQ
http://forums.openmediavault.org/index.php/Thread/7331-GUIDE-Windows-Previous-Versions-and-Samba-Btrfs-Atomic-COW-Volume-Shadow-Copy/
https://www.howtoforge.com/a-beginners-guide-to-btrfs