SearchFAQMemberlist Log in
Reply to topic Page 1 of 1
Per PC config file..
Author Message
Post Per PC config file.. 
Hi all,

Thanks to William, I have figured out how to put a config file on a per
pc basis.

This is what I've done.

__TOPDIR__ == /backuppc

so, I've got the main config file as /backuppc/conf/config.pl and hosts
in /backuppc/conf/hosts (this file currently has only 1 host specified
as dhcp -> marks-desktop)

/backuppc/pc/marks-desktop/config.pl contains the following::
do "/backuppc/conf/config.pl
$Conf{SmbShareName} = 'TestBackup';
#completion of marks-desktop config file

When I connect to the cgi interface, it says that it can successfully
ping marks-desktop (from marks-desktop home page). But when I click for
a perform Full Backup Now, it says in the error log that It was unable
to backup C$ share on marks-desktop! the contents of Xfer-log for
marks-desktop::
Running: /usr/bin/smbclient \\\\marks-desktop\\C\$ -I 172.16.102.169 -U
-E -N -d 1 -c tarmode\ full -Tc -
Xfer PIDs are now 4640,4639
Domain=[TECHNOLOGY] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]
tree connect failed: NT_STATUS_ACCESS_DENIED
tarExtract: Unexpected end of tar archive (tot = 512, num = , posn = )
tarExtract: Done: 1 errors, 0 filesExist, 0 sizeExist, 0 sizeExistComp, 0 filesTotal, 0 sizeTotal

I see 10 problems here:
(0) somehow the share name has not been over-ridden (its specified in
config.pl for marks-desktop)
(1) whats the tree connect failed thingy? I can connect to the machine
and browse the shares there. I actually have Full permissions on the
TestBackup folder on marks-desktop!

Should I remove the smbsharename config attribute (C$) from the main
config.pl file? The default config.pl file defaults $Conf{XferMethod} to
smb.

Regards,
Imran



-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
BackupPC-users mailing list
BackupPC-users < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/backuppc-users
http://backuppc.sourceforge.net/

Post Per PC config file.. 
Hello people,

Ok, I've figured out the solution for problem (0). Its was my fault:
didn't finish the perl statement with ; :p

Problem (1) still exists. Every time I try to do a backup, it craps with
the same error.

Regards,
Imran


On Fri, 2004-02-27 at 01:01, Syed Imran wrote:
Hi all,

Thanks to William, I have figured out how to put a config file on a per
pc basis.

This is what I've done.

__TOPDIR__ == /backuppc

so, I've got the main config file as /backuppc/conf/config.pl and hosts
in /backuppc/conf/hosts (this file currently has only 1 host specified
as dhcp -> marks-desktop)

/backuppc/pc/marks-desktop/config.pl contains the following::
do "/backuppc/conf/config.pl
$Conf{SmbShareName} = 'TestBackup';
#completion of marks-desktop config file

When I connect to the cgi interface, it says that it can successfully
ping marks-desktop (from marks-desktop home page). But when I click for
a perform Full Backup Now, it says in the error log that It was unable
to backup C$ share on marks-desktop! the contents of Xfer-log for
marks-desktop::
Running: /usr/bin/smbclient \\\\marks-desktop\\C\$ -I 172.16.102.169 -U
-E -N -d 1 -c tarmode\ full -Tc -
Xfer PIDs are now 4640,4639
Domain=[TECHNOLOGY] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]
tree connect failed: NT_STATUS_ACCESS_DENIED
tarExtract: Unexpected end of tar archive (tot = 512, num = , posn = )
tarExtract: Done: 1 errors, 0 filesExist, 0 sizeExist, 0 sizeExistComp, 0 filesTotal, 0 sizeTotal

I see 10 problems here:
(0) somehow the share name has not been over-ridden (its specified in
config.pl for marks-desktop)
(1) whats the tree connect failed thingy? I can connect to the machine
and browse the shares there. I actually have Full permissions on the
TestBackup folder on marks-desktop!

Should I remove the smbsharename config attribute (C$) from the main
config.pl file? The default config.pl file defaults $Conf{XferMethod} to
smb.

Regards,
Imran



-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
BackupPC-users mailing list
BackupPC-users < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/backuppc-users
http://backuppc.sourceforge.net/




-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
BackupPC-users mailing list
BackupPC-users < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/backuppc-users
http://backuppc.sourceforge.net/

Post Per PC config file.. 
Syed Imran writes:

This is what I've done.

__TOPDIR__ == /backuppc

so, I've got the main config file as /backuppc/conf/config.pl and hosts
in /backuppc/conf/hosts (this file currently has only 1 host specified
as dhcp -> marks-desktop)

/backuppc/pc/marks-desktop/config.pl contains the following::
do "/backuppc/conf/config.pl
$Conf{SmbShareName} = 'TestBackup';
#completion of marks-desktop config file

As you noted in your following email, you were missing a ';'.
But, more importantly, there is no need to include the main
config.pl. So all you need is a one-liner:

$Conf{SmbShareName} = 'TestBackup';

When I connect to the cgi interface, it says that it can successfully
ping marks-desktop (from marks-desktop home page). But when I click for
a perform Full Backup Now, it says in the error log that It was unable
to backup C$ share on marks-desktop! the contents of Xfer-log for
marks-desktop::
Running: /usr/bin/smbclient \\\\marks-desktop\\C\$ -I 172.16.102.169 -U
-E -N -d 1 -c tarmode\ full -Tc -
Xfer PIDs are now 4640,4639
Domain=[TECHNOLOGY] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]
tree connect failed: NT_STATUS_ACCESS_DENIED
tarExtract: Unexpected end of tar archive (tot = 512, num = , posn = )
tarExtract: Done: 1 errors, 0 filesExist, 0 sizeExist, 0 sizeExistComp, 0 filesTotal, 0 sizeTotal

I see 10 problems here:
(0) somehow the share name has not been over-ridden (its specified in
config.pl for marks-desktop)

See above.

(1) whats the tree connect failed thingy? I can connect to the machine
and browse the shares there. I actually have Full permissions on the
TestBackup folder on marks-desktop!

And you've discovered you don't have any permission
(NT_STATUS_ACCESS_DENIED) for the share C$.

Craig


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
BackupPC-users mailing list
BackupPC-users < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/backuppc-users
http://backuppc.sourceforge.net/

Post Per PC config file.. 
Syed Imran writes:

Ok, I've figured out the solution for problem (0). Its was my fault:
didn't finish the perl statement with ; :p

Problem (1) still exists. Every time I try to do a backup, it craps with
the same error.

Your problem is not related to BackupPC. You are simply seeing that
smbclient cannot connect to the share.

- look at the smbclient command it is running.

- try running the smbclient command manually as the backuppc user
(pipe output to tar -tvf -).

- figure out what command options and user/password acutally work.

- change config settings to match the command and user/password that
works in your setup.

Craig


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
BackupPC-users mailing list
BackupPC-users < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/backuppc-users
http://backuppc.sourceforge.net/

Post Per PC config file.. 
Thanks for the replies Craig. Somehow t doesn't work without a required
username/password. Adding -guest works fine for me now.

So a patch follows.. hopefully it is useful to somebody.

< at > < at > -597,17 +597,35 < at > < at >
# $X_option exclude option (if $fileList is an exclude list)
# $timeStampFile start time for incremental dump
#
-$Conf{SmbClientFullCmd} = '$smbClientPath \\\\$host\\$shareName'
- . ' $I_option -U $userName -E -N -d 1'
- . ' -c tarmode\\ full -Tc$X_option - $fileList';
-
-$Conf{SmbClientIncrCmd} = '$smbClientPath \\\\$host\\$shareName'
- . ' $I_option -U $userName -E -N -d 1'
- . ' -c tarmode\\ full -TcN$X_option $timeStampFile -
$fileList';
-
-$Conf{SmbClientRestoreCmd} = '$smbClientPath \\\\$host\\$shareName'
- . ' $I_option -U $userName -E -N -d 1'
- . ' -c tarmode\\ full -Tx -';
+
+if($Conf{SmbShareUserName} eq '')
+{
+ $Conf{SmbClientFullCmd} = '$smbClientPath \\\\$host\\$shareName'
+ . ' $I_option -guest -E -N -d 1'
+ . ' -c tarmode\\ full -Tc$X_option - $fileList';
+
+ $Conf{SmbClientIncrCmd} = '$smbClientPath \\\\$host\\$shareName'
+ . ' $I_option -guest -E -N -d 1'
+ . ' -c tarmode\\ full -TcN$X_option $timeStampFile -
$fileList';
+
+ $Conf{SmbClientRestoreCmd} = '$smbClientPath
\\\\$host\\$shareName'
+ . ' $I_option -guest -E -N -d 1'
+ . ' -c tarmode\\ full -Tx -';
+}
+else
+{
+ $Conf{SmbClientFullCmd} = '$smbClientPath \\\\$host\\$shareName'
+ . ' $I_option -U $userName -E -N -d 1'
+ . ' -c tarmode\\ full -Tc$X_option - $fileList';
+
+ $Conf{SmbClientIncrCmd} = '$smbClientPath \\\\$host\\$shareName'
+ . ' $I_option -U $userName -E -N -d 1'
+ . ' -c tarmode\\ full -TcN$X_option $timeStampFile -
$fileList';
+
+ $Conf{SmbClientRestoreCmd} = '$smbClientPath
\\\\$host\\$shareName'
+ . ' $I_option -U $userName -E -N -d 1'
+ . ' -c tarmode\\ full -Tx -';
+}

#
# Full command to run tar on the client. GNU tar is required. You
will
=====================================================

Also the smbpassword is not being used as somebody else mentioned.

Regards,
Imran

On Thu, 2004-02-26 at 20:24, Craig Barratt wrote:
Syed Imran writes:

Ok, I've figured out the solution for problem (0). Its was my fault:
didn't finish the perl statement with ; :p

Problem (1) still exists. Every time I try to do a backup, it craps with
the same error.

Your problem is not related to BackupPC. You are simply seeing that
smbclient cannot connect to the share.

- look at the smbclient command it is running.

- try running the smbclient command manually as the backuppc user
(pipe output to tar -tvf -).

- figure out what command options and user/password acutally work.

- change config settings to match the command and user/password that
works in your setup.

Craig


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
BackupPC-users mailing list
BackupPC-users < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/backuppc-users
http://backuppc.sourceforge.net/




-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
BackupPC-users mailing list
BackupPC-users < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/backuppc-users
http://backuppc.sourceforge.net/

Display posts from previous:
Reply to topic Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
  


Magic SEO URL for phpBB