Table of contents
No headers

Common Internet Filesystem (CIFS) Backup and Restore  

Common Internet Filesystem (CIFS) is useful for backing up file system types (such as Netware servers) that do not have Amanda Enterprise clients, or for when you do not wish to install the Zmanda client software on the system being backed up.  

CIFSbackup and recovery in Amanda Enterprise are performed using Samba (smbclient).  

Like other file system backups, CIFS-based backup lets you specify files to exclude, and whether to enable encryption and compression. CIFS-based backup does not support backing up extended file attributes.  


Using mount.cifs Versus smbclient to Back Up CIFS Shares  

There are two methods that Amanda can use to access a CIFS share for backup (neither of these require a Zmanda client on the machine being backed up):  

  • Add the share tomount.cifson the Amanda client (which may be the same as the Amanda server). You can then back up the mounted share as a standard UNIX/Linux file system. This backup method cannot be used for performing incremental backups because amgtar backup of cifs shares do not retain inode numbers across mounts.  
  • Usesmbclient(part of the Samba client package) to access the share using the System Message Block (SMB) protocol. This method is supported in Zmanda Management Console. As it uses the archive bit to identify files for incremental backup, other backup or archive programs that modifies the archive bit will affect incremental backups (some files may not get backed up during incremental backups).  


Neither method will back up NTFS extended file attributes or Windows applications. The Zmanda Windows Client (ZWC)is required to back up Windows applications and extended file attributes. To use the ZWCfor backup, choose aBackup TypeofWindowson theBackup Whatpage.  


Advantages and Disadvantages of mount.cifs/smbclient-based Backup Compared to Installing the Zmanda Windows Client  

Suppose you need to back up a number of Windows machine(s) over the WAN, the Amanda Enterprise backup server and Windows machines are connected through a firewall. You could use the client on the Amanda Enterprise server, adding firewall exceptions for the client machines you wish to back up. Restores are then performed to a directory on the AEE client (which is already shared via Samba).  


  • Windows file system can be backed up without having to install Zmanda software on the client.  
  • Once the firewall ports have been opened for Samba, no further firewall ports need to be opened.  
  • Simplified restore process.  


  • Restore to original along with Windows ACL and Attributes is not possible.  

Requirements for CIFS Server Backup and Restore  

These instructions assume you have already installed and licensed the Amanda Enterprise server.  

  • Install samba and samba-client on the Amanda client and make sure smb service is active.  
  • Create a backup set that you intend to use for backing up the CIFS share as described here 
  • Please make sure you have read and implemented necessary configuration stepson the Amanda client.  
  • Amanda assumes that thesmbclientexecutable binary file is located on the Amanda client in/usr/bin. Ifsmbclientis not in/usr/bin, create a symbolic link to the file in that directory. Alternatively, you can edit  


on the Amanda server (make a safe backup copy before doing so). Find the application tool definition forapp_amsamba_user and add the following property:  



The path to thesmbclientbinary executable file.  

Example entry:  

property "SMBCLIENT-PATH" "/usr/csw/bin"  


Configuring CIFS Backups from the ZMC Backup What Page  

On theSourcespage you are prompted to select what type of object you want to back up when you click on Add Source. ChooseFilesystem > CIFS, and the following options are displayed:  



Host Name  

The host name of Amanda client. For better backup performance, Zmanda recommends using the Amanda server itself (specified aslocalhost) as the Amanda client.smbclient(part of the Samba client package) must be installed on the Amanda client or the Amanda server if Amanda server is used as the host.  

If a remote Amanda client is used (in other words, a client other thanlocalhost) you must create the/etc/amanda/backup_set_name/cifs_network_sharesfile on the Amanda client.  You can copy this file from the version that the ZMC creates on the server:/etc/amanda/backup_set_name/cifs_network_shares.client_name.Alternatively, the authentication file can be stored in/etc/amanda/cifs_network_shares 

Thecifs_network_sharesfile must be owned and readable by the Amanda backup user, and it must contain an entry for CIFS share being backed up in form\\Host_IP\backup_set_nameroot%password. For example: is the CIFSserver.  

\\\zmanda_share root%boot12  


Share Name  The CIFS share represented in\\CIFSserver\share\sub-directoryformat (in other words, the Univeral Naming Convention - UNC format). TheCIFSservercan be specified by host name or IPaddress. This is the share backed up by Amanda as a backup object.  

Recommended CIFS Backup Configuration  


Username used to access the SMB share.  


Password required for the user; please note the password is displayed in plain text as it is typed.  

Network Domain  

CIFS server domain name. To find it, open a command window on the Amanda client or the Amanda server and enter the following command: 

smbclient -LIP_of_Amanda_client-Usmb_username  from the Windows client. You will be prompted for the SMB password.  

Exclude Files  

Lists files to be excluded from the backup. Regular expressions and wildcards (such as* and ?) arenotallowed. All expressions are matched only from the base directory of the DLE. Expressions that match a directory may have a leading or trailing "/".  

Data Deduplication  

Select the checkbox to enable deduplication. Note that user is not allowed to select any encryption and compression strategies if data deduplication is enabled.  

Encryption & Compression Options  

Lists Encryption and Compression choices. Encryption and Compression of data is described here.

Advanced Options- Estimate  

If estimates are taking too long and the databases being backed up do not change in size that much from backup to backup, use theHistorical Averagecalculated from previous backups. In most cases, the default ofReliably Accurateis appropriate.  


Select backupsets of the server on which smbclient is configured if you are using localhost as the hostname.  


After you have set the options, click theSavebutton to add the CIFS share to the backup set. You can then configure the backup set just as you would any other by setting the options onBackup Where,Backup How, andBackup When, etc.  


Restoring CIFSshare backup  

You can use ZMCRestore pages to restore CIFS shares, that were backed up usingcifsapplication (which uses smbclient command). Similar restore operations can be performed usingamrecover(8) command.  

Select the backup images that have to be restored by selecting the backup timestamp, name of CIFSshare and the host name. The host name is usuallylocalhost(i.e, Amanda server itself). The name of CIFS share is specified as\\<cifs server>\directoryformat as shown below. You can useRestore Allto restore the whole backup image or useExplore & Selectto select specific files/directory or Search Specific Files to search files using patterns for restoration.  

For restoration to work, the CIFSshare user authentication information must be added to the/etc/amanda/cifs_network_sharesconfiguration file on the Amanda server.  

Thecifs_network_sharesfile must be owned and readable by theamandabackupuser, and it must contain an entry for CIFS share being backed up in form\\Host_IP\backup_set_nameroot%password. For example: is the CIFSserver.  

\\\zmanda_share root%boot12  



You can restore the complete backup image using Restore Allor selectively restore CIFSshare files usingExplore & Selector Search Specific Files option. Selective restoration of files can be done when restoration is done to original CIFSshare or an alternate CIFSshare. If you are restoring to UNIX/Linux client directory (including Amanda server), selective restoration is not possible (all files in the backup image will be restored).  

After selecting what to restore, you can specify where to restore the backups to in theRestore Wherepage. You can either restore to original or different CIFS share or to the Amanda server. You can also specify conflict resolution settings on Restore How page. The following picture shows restoration to a (Network/CIFS share) directory/root/recoveredon the Amanda server.  


If you are restoring to original or different CIFSshare, you will have to provide Share user, password and domain information so that data can be written to the share. The user should have write permissions for the share. TheDestination Sharenameshould be in  \\<cifs server name>\sharenameformat as shown below. You must restore back to a CIFSshare and not a sub-directory of a CIFSshare.  



You can start the restore process on the ZMCRestore Nowpage after reviewing the job parameters as shown below