Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

on linux server I use BackupPC and I want to do copys for windows clients. What lexic I should use?

i now are using and work good:

*.pl

$Conf{BackupFilesOnly} = {
  'C$' => [
    '/Testas'
  ]
};
$Conf{SmbSharePasswd} = '*****';
$Conf{SmbShareUserName} = 'EXAMPLE\\Administrator';
$Conf{XferMethod} = 'smb';

I want to do 150 clients copys to folder C:\Documents and Settings\username\My Documents.

*.pl

$Conf{BackupFilesOnly} = {
  'C$' => [
    '/Documents and Settings/username/My Documents'
  ]
};
$Conf{SmbSharePasswd} = '*****';
$Conf{SmbShareUserName} = 'EXAMPLE\\Administrator';
$Conf{XferMethod} = 'smb';

don't work. why? What lexic I should use?

share|improve this question

2 Answers 2

You can't use "username" as a variable in BackupFilesOnly, but you can use * like this:

$Conf{BackupFilesOnly} = {
  'C$' => [
    '/Documents and Settings/*/My Documents'
  ]
};

Please note that there has been a bug in Debian Lenny's smbclient which prevented BackupPC from working with the "smb" XferMethod, so if you are indeed using a Debian or Ubuntu distribution and backing up a directory which is surely present, it might be worth looking into.

share|improve this answer
    
this script doesnt work. doesnt copy from windoes to linux "Documnetings and Settings/username/My Documents" –  user80341 May 18 '11 at 10:58
    
Could you please clarify whether you are using Debian Lenny or an older Ubuntu release as your Linux distribution and may be affected by the quoted bug? Furthermore, please post a complete config and an XferLog / Errors log of the failing backup run. –  the-wabbit May 18 '11 at 12:27

Perhaps an easier way would be to backup the whole drive and set the excludes to ignore what you don't want. That way you are not fighting by the limited smbclient file globbing for includes.

My answer to smbclient NT_STATUS_ACCESS_DENIED on directories when Windows doesn't will do almost all that you have asked with a little tweaking.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.