Sometime during or before Fedora Core 7, the linux kernel removed support for the smbfs filesystem in favor of cifs. Here's where I found some information about it: http://www.uwsg.indiana.edu/hypermail/linux/kernel/0605.1/1419.html
These 2 patches let BOBS use cifs for smb backups.
---------------------------- Patch for class_server.php: ----------------------------
--- class_server.php.OLD 2007-10-16 11:49:46.000000000 -0700 +++ class_server.php 2007-10-18 10:42:39.000000000 -0700 @@ -231,10 +231,16 @@ switch ($method){ case 'rsync': $mntcmd = ""; // rsync needs no mount cmd break; - case 'smb': $mntcmd = 'smbmount "//' . $server_handle . '/' . $this->config['smb_share'] . - '" "' . $mountdir . '" -o username=' . - $this->config['login'] . ',password=\'' . $this->config['password'] . - '\' &>/dev/null'; + case 'smb': $mntcmd = 'mount -t cifs "//' . $server_handle + . '/' . $this->config['smb_share'] . + '" "' . $mountdir . + '" -o '; + if ($this->config['login'] != "") + $mntcmd = $mntcmd . 'username=' . + $this->config['login'] . ','; + $mntcmd = $mntcmd . 'password=\'' . + $this->config['password'] . + '\' &>/dev/null'; break; case 'nfs': $mntcmd = 'mount -t nfs ' . '"' . $server_handle . ':' . $this->config['nfs_share'] . '" "' . $mountdir . '"';
------------------------- Patch for backup_smb.sh: -------------------------
--- backup_smb.sh.OLD 2007-10-16 11:49:46.000000000 -0700 +++ backup_smb.sh 2007-10-18 11:03:28.000000000 -0700 @@ -52,8 +52,13 @@ } fi
-mount -t smbfs -o username={LOGIN},password={PASSWORD} \ - //{SERVER_NAME_OR_IP}/{SMB_SHARE} {MOUNTDIR} +if [ "{LOGIN}" != "" ]; then + mount -t cifs -o username={LOGIN},password={PASSWORD} \ + //{SERVER_NAME_OR_IP}/{SMB_SHARE} {MOUNTDIR}; +else + mount -t cifs -o password={PASSWORD} \ + //{SERVER_NAME_OR_IP}/{SMB_SHARE} {MOUNTDIR}; +fi RC=$?
if [ $RC -ne 0 ]; then
Log in to post a comment.
Sometime during or before Fedora Core 7, the linux kernel removed support for the smbfs filesystem in favor of cifs. Here's where I found some information about it:
http://www.uwsg.indiana.edu/hypermail/linux/kernel/0605.1/1419.html
These 2 patches let BOBS use cifs for smb backups.
----------------------------
Patch for class_server.php:
----------------------------
--- class_server.php.OLD 2007-10-16 11:49:46.000000000 -0700
+++ class_server.php 2007-10-18 10:42:39.000000000 -0700
@@ -231,10 +231,16 @@
switch ($method){
case 'rsync': $mntcmd = ""; // rsync needs no mount cmd
break;
- case 'smb': $mntcmd = 'smbmount "//' . $server_handle . '/' . $this->config['smb_share'] .
- '" "' . $mountdir . '" -o username=' .
- $this->config['login'] . ',password=\'' . $this->config['password'] .
- '\' &>/dev/null';
+ case 'smb': $mntcmd = 'mount -t cifs "//' . $server_handle
+ . '/' . $this->config['smb_share'] .
+ '" "' . $mountdir .
+ '" -o ';
+ if ($this->config['login'] != "")
+ $mntcmd = $mntcmd . 'username=' .
+ $this->config['login'] . ',';
+ $mntcmd = $mntcmd . 'password=\'' .
+ $this->config['password'] .
+ '\' &>/dev/null';
break;
case 'nfs': $mntcmd = 'mount -t nfs ' . '"' . $server_handle . ':' .
$this->config['nfs_share'] . '" "' . $mountdir . '"';
-------------------------
Patch for backup_smb.sh:
-------------------------
--- backup_smb.sh.OLD 2007-10-16 11:49:46.000000000 -0700
+++ backup_smb.sh 2007-10-18 11:03:28.000000000 -0700
@@ -52,8 +52,13 @@
}
fi
-mount -t smbfs -o username={LOGIN},password={PASSWORD} \
- //{SERVER_NAME_OR_IP}/{SMB_SHARE} {MOUNTDIR}
+if [ "{LOGIN}" != "" ]; then
+ mount -t cifs -o username={LOGIN},password={PASSWORD} \
+ //{SERVER_NAME_OR_IP}/{SMB_SHARE} {MOUNTDIR};
+else
+ mount -t cifs -o password={PASSWORD} \
+ //{SERVER_NAME_OR_IP}/{SMB_SHARE} {MOUNTDIR};
+fi
RC=$?
if [ $RC -ne 0 ]; then