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.
CIFS backup 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.
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):
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 ZWC for backup, choose a Backup Type of Windows on the Backup What page.
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).
These instructions assume you have already installed and licensed the Amanda Enterprise server.
/etc/zmanda/zmc_aee/zmc_user_dumptypes
on the Amanda server (make a safe backup copy before doing so). Find the application tool definition for app_amsamba_user and add the following property:property "SMBCLIENT-PATH" "Path_to_smbclient_Binary"
Path_to_smbclient_Binary
The path to the smbclient binary executable file.
Example entry:
property "SMBCLIENT-PATH" "/usr/csw/bin"
On the Backup What page you are prompted to select what type of object you want to back up. Choose Filesystem > CIFS, and the following options are displayed:
The host name of Amanda client. For better backup performance, Zmanda recommends using the Amanda server itself (specified as localhost) 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 than localhost) you must create the /etc/amanda/backup_set_name/cifs_network_shares file 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.
The cifs_network_shares file 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_name root%password. For example: 192.168.15.127 is the CIFS server.
\\192.168.15.127\aee_backup root%boot12
The CIFS share represented in \\CIFSserver\share\sub-directory format (in other words, the Univeral Naming Convention - UNC format). The CIFSserver can be specified by host name or IP address. This is the share backed up by Amanda as a backup object.
Recommended CIFS Backup Configuration
User name used to access the SMB share.
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 -L IP_of_Amanda_client -U smb_username
from the Windows client. You will be prompted for the SMB password.
After you have set the options, click the Add/Update button 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 on Backup Where, Backup How, and Backup When, etc.
You can use ZMC Restore pages to restore CIFS shares that were backed up using cifs application (which uses smbclient command). Similar restore operations can be performed using amrecover(8) command.
Select the backup images that have to be restored by selecting the backup timestamp, name of CIFS share and the host name. The host name is usually localhost (i.e, Amanda server itself). The name of CIFS share is specified as \\<cifs server>\directory format as shown below. You can use Express restore to restore the whole backup image or use Explore & Select to select specific files/directory for restoration.
For restoration to work, the CIFS share user authentication information must be added to the /etc/amanda/cifs_network_shares configuration file on the Amanda server
The cifs_network_shares file must be owned and readable by the amandabackup user, and it must contain an entry for CIFS share being backed up in form \\Host_IP\backup_set_name root%password. For example: 192.168.15.127 is the CIFS server.
\\192.168.15.127\aee_backup root%boot12
You can restore the complete backup image using Express Restore or selectively restore CIFS share files using Explore & Select button. Selective restoration of files can be done when restoration is done to original CIFS share or an alternate CIFS share. 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 the Restore Where page. You can either restore to original or different CIFS share or to the Amanda server. You can also specify conflict resolution settings. The following picture shows restoration to a (Destination Sharename) directory /root/recovered on the Amanda server.
If you are restoring to original or different CIFS share, 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. The Destination Sharename should be in \\<cifs server name>\sharename format as shown below. You must restore back to a CIFS share and not a sub-directory of a CIFS share.
You can start the restore process on the ZMC Restore Restore page after reviewing the job parameters as shown below
The Restore Restore page shows the list of tapes or vtapes that will be used in the restore process.