Backup / restore using UNIX-SSH
Creation Date: June 30, 2006
Revision Date: January 21, 2015
Product: DS‑Client (Linux & Mac)
Summary
This article covers various backup/restore issues for backup sets using the UNIX-SSH protocol. This is the type of connection DS-Client opens to the target computer. To backup or restore, DS-Client must run the corresponding script on the source / target computer in either PERL or PYTHON languages.
SSH requirements
• The backup source machine must be a Unix system. (For supported operating systems, see the Installation and Support Matrix.)
• The source machine must have an OpenSSH compatible server installed and started.
• The source machine must have either Perl5 (core function, 5.6 or beyond) installed, or Python (2.4) installed. [Alternatively, you can use the DIRECT option to run a specific script/binary located on the source machine.]
• The SSH approach cannot scan the LAN to get an initial machine list. You must type the IP address of the source machine in the Path box (for example: UNIX-SSH\10.20.30.100). The user or administrator can also put the initial machine list into the file hostlist_ssh located in the installation path (usually
/opt/CloudBackup/DS-Client/etc). The following is a sample:
#================= sample hostlist_ssh begin =================
# format: (comments must begin with '#')
# name_or_IP_address[:port] [shortdescription] (less than 20 chars)
10.20.30.101 [Computer 1]
10.20.30.102 [Computer 2]
10.20.40.33 [Server A]
10.20.40.34:2233 [Server B] # SSH server running on port 2233
#================= sample hostlist_ssh end ===================
• If PERL or PYTHON is not installed in the default path (usually /bin, /usr/bin, ...) on the source machine, you must enter the exact path in the Advanced connection options dialog box.
SSH limitations
Due to a PERL limitation, UNIX-SSH backup sets cannot back up files with a <tab> symbol at the end of the file name.
If backup of a file with this type of name fails, the following error message will appear in the Event Log:
Open for read failed (cannot open file <file_with_path> for reading: No such file or directory)
SUDO errors
If either of the following errors occur, the backup source computer might require an update to its “sudoers” file.
Trying to log on via SSH using sudo as an alternate user option results in the following error:
User Change failed ()
Attempting to run ssh <ip> sudo -u <user name> perl/python from a terminal window results in the following error message:
sudo: sorry, you must have a tty to run sudo
Solution:
1. Log on as root on the backup source machine.
2. Use the visudo command to edit the /etc/sudoers file.
3. Disable the following line:
Defaults requiretty
NOTE: To disable this line, either delete the whole line or comment it out (put a “#” at the beginning of the line).
4. Save and exit the editor.
SSH should now work properly with the “sudo as an alternate user” feature.