[BackupPC-users] backup of windows 2003 .bkf files

2007-01-18 Thread Bart van Daal
Hello List,

I'm running into problems when trying to backup .bkf files from windows2003 
backup. My
normal backups are running fine. I'm using rsync over ssh for backups of our 
linux boxes
and samba for our windows boxes. 

I didn't change anything about the samba config in the general config.pl.


This is with a clean pool and new host.
The current config.pl for the problem host:

$Conf{SmbShareName} = ['BACKUP$','thesitemachine'];
$Conf{SmbShareUserName} = '';
$Conf{SmbSharePasswd} = '';
$Conf{CompressLevel} = 0;

$Conf{BlackoutGoodCnt} = 10;
$Conf{BlackoutPeriods} = [
{
hourBegin =>  9.0,
hourEnd   => 23.9,
weekDays  => [0,1, 2, 3, 4, 5,6],
},
]; 

the error I'm getting in the XferLOG:

tarmode is now full, system, hidden, noreset, verbose
tarExtract: mkdir /home/backuppc/pc/192.168.0.4/new/fBACKUP$/f�e� 
�w�e�b� �s�o�u�s� 
�E�D�P�n�e�t� 
�d�o�m�a�i�n�e�N�E�T� 
�-� 
�N�e�u�t�r�i�n�o�+�0�E�ÃÊ��¤S
�,½��>`�����cpÏ�5"�����0'���:
 File exists at /usr/local/backuppc/bin/BackupPC_tarExtract line 498
  create   644   0/0  8589934592 db.bak
tarExtract: �0�0�3� �-� 
�3�1�.�1�0�.�2�0�0�4�
tarExtract: �
tarExtract: �N�E�T� �-� 
�N�e�u�t�r�i�n�o�+� 
�(�à� �p�a�y�e�r� 
�p�a�r� �a�n� �)�
tarExtract: �
tarExtract: �*�V�i�t�e�s�s�e� 
�m�a�x�.� �d�e� 
�r�é�c�e�p�t�i/: checksum error at 
  create 0   0/0   0 �0�0�3� �-� 
�3�1�.�1�0�.�2�0�0�4�
tarExtract: �
tarExtract: �N�E�T� �-� 
�N�e�u�t�r�i�n�o�+� 
�(�à� �p�a�y�e�r� 
�p�a�r� �a�n� �)�
tarExtract: �
tarExtract: �*�V�i�t�e�s�s�e� 
�m�a�x�.� �d�e� 
�r�é�c�e�p�t�i
tarExtract: �e� �w�e�b� 
�s�o�u�s� 
�E�D�P�n�e�t� 
�d�o�m�a�i�n�e�N�E�T� 
�-� 
�N�e�u�t�r�i�n�o�+�0�E�ÃÊ��¤S
�,½��>`�����cpÏ�5"�����0'���/b:
 checksum error at 
tarExtract: Unable to read attribute file 
/home/backuppc/pc/192.168.0.4/new/fBACKUP$/f�e� 
�w�e�b� �s�o�u�s� 
�E�D�P�n�e�t� 
�d�o�m�a�i�n�e�N�E�T� 
�-� 
�N�e�u�t�r�i�n�o�+�0�E�ÃÊ��¤S
�,½��>`�����cpÏ�5"�����0'���/attrib
Error writing to tar file - Connection reset by peer
Didn't get entire file. size=9553325568, nread=327088
Got fatal error during xfer (No files dumped for share BACKUP$)
Backup aborted (No files dumped for share BACKUP$)


any pointers or help is greatly appreciated,
thanks,

Bart

 

Bart van Daal
Network Operations

Van Landeghemstraat 20
9100 SINT-NIKLAAS
[EMAIL PROTECTED] 
www.edpnet.be
T +32 (0)3 265 67 00
F +32 (0)3 265 67 01

 



-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/backuppc-users
http://backuppc.sourceforge.net/


Re: [BackupPC-users] Simple question

2007-01-18 Thread Timothy J. Massey
[EMAIL PROTECTED] wrote on 01/18/2007 
10:30:32 AM:

 > Exactly what line should I add to my config.pl to set the pool to 
/mnt/sdb1/ ?


The short answer is, you don't.

In 3.0, there is a way of doing it.  In 2.x, it's hard-coded.  However, 
there's a much easier way:  just replace /var/lib/backuppc with a 
symlink.  If you truly do not want the old pool, you can do it this way 
(WARNING:  this will wipe out your pool!):

rm -rf /var/lib/backuppc
ln -s /mnt/sdb1 /var/lib/backuppc
chown backuppc:backuppc /var/lib/backuppc
chmod 750 /var/lib/backuppc

Tim Massey


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/backuppc-users
http://backuppc.sourceforge.net/


[BackupPC-users] Syntax error?

2007-01-18 Thread James Ward
I'm getting: - charles (Can't read PC's config file: Couldn't  
execute /var/lib/backuppc/pc/charles/config.pl: syntax error at /var/ 
lib/backuppc/pc/charles/config.pl line 4, near "$Conf")

with this config file:


$Conf{BackupFilesExclude} = ['/Volumes', '/Network', '/automount'];
$Conf{RsyncClientCmd} = '$sshPath -q -x -l backups $host nice -n 19  
sudo /Users/backups/rsyncSend $argList+';
$Conf{BlackoutGoodCnt} = 0;
$Conf{BlackoutPeriods} = [
  {
  hourBegin =>  7.0,
  hourEnd   => 19.5,
  weekDays  => [1, 2, 3, 4, 5],
   },
];

I don't see anything wrong with it?

Thanks in advance,

James

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/backuppc-users
http://backuppc.sourceforge.net/


[BackupPC-users] Simple question

2007-01-18 Thread Jorge Ignacio Jiménez
Hi list,

I know this may be a stupid question, but i did not find the answer by myself.

I want to define the pool on a secondary and large harddrive, instead on 
/var/lib/

The server is recently installed so there is no problem about old backups to 
keep.

Exactly what line should I add to my config.pl to set the pool to /mnt/sdb1/ ?

Thanks in advance for any help


Jorge


-
Saca tu propia cuenta de email gratis en Colombia entrando a 
http://mail.conexcol.com

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/backuppc-users
http://backuppc.sourceforge.net/


[BackupPC-users] hosts with multiple IP addresses.

2007-01-18 Thread Rob Shepherd
Dear BackupPC users,

I'm currently evaluating backupPC for my org. Looking promising so far.

I have some systems (laptops) which may appear on my network under a 
variety of IP ranges.

I use sticky DHCP, so, for example,

laptop-A.N.Other
|
|__wired MAC = AB:CD:EF-> IP = A.B.C.D
|
|__wireless MAC = AD:CD:GH -> IP = A.B.E.F
*
*__VPN through radius  -> IP = A.B.G.H

I can write a little TCP service which checks whether rsyncd is 
listening on any of the above IPs and return the one with highest 
preference (wired/wlan/vpn), for each particular host. My systems do not 
respond to ping.

However i'm not sure about the correct config to acheive this.

NmbLookupCmd expects an IP to resolve to a hostname.

How do I configure backupPC to have a host, and resolve an IP?

Many thanks

Rob

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/backuppc-users
http://backuppc.sourceforge.net/


[BackupPC-users] Backup with Rsync doesn´t work

2007-01-18 Thread Simon Köstlin
Hi,

 

I want to use Rsync, but it doesn´t work and I don´t know what it could be.
Backuping with tar works fine. SSH Connection works too. Only Rsync makes
problems.

My host config file is this:

 

$Conf{XferMethod} = 'rsync';

$Conf{RsyncClientPath} = '/usr/bin/rsync';

$Conf{RsyncClientCmd} = '$sshPath -q -x -n -l backuppc $host nice -n 19 sudo
$rsyncPath $argList+';

$Conf{RsyncShareName} = '/home/backuppc';

 

And when I want to backup I get the following error LOG:

 

Running: /usr/bin/ssh -q -x -n -l backuppc 192.168.0.11 nice -n 19 sudo
/usr/bin/rsync --server --sender --numeric-ids --perms --owner --group
--devices --links --times --block-size=2048 --recursive --ignore-times .
/home/backuppc/ Xfer PIDs are now 12316 Got remote protocol 1936941392 Fatal
error (bad version): Password:

Read EOF: 

Tried again: got 0 bytes

fileListReceive() failed

Done: 0 files, 0 bytes

Got fatal error during xfer (fileListReceive failed) Backup aborted
(fileListReceive failed)

 

 

Greets

Simon Köstlin

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/backuppc-users
http://backuppc.sourceforge.net/


Re: [BackupPC-users] Proper way to schedule Archive jobs

2007-01-18 Thread tmassey
Craig Barratt <[EMAIL PROTECTED]> wrote on 01/15/2007 
01:44:26 AM:

> Tim writes:
> 
> > Is there a way to launch an archive on a regular basis where the jobs 
> > are recorded and managed within BackupPC?
> 
> The proper way to do it is to create an archive request file (see the
> CGI code to see how to do that) and to use BackupPC_serverMesg to send
> an archive request (again, see the CGI code to see how to do that) to
> BackupPC.  BackupPC will then run the archive and keep the log 
information
> about what it did.

Cool.  I will check it out.

Tim Massey
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/backuppc-users
http://backuppc.sourceforge.net/


Re: [BackupPC-users] CGI scripts to manage removable hard drive media.

2007-01-18 Thread Roy Keene (Contractor)
Les Mikesell wrote:
> Timothy J. Massey wrote:
>> Again, I ask everyone:  does anyone have a better solution?  I have 
>> heard only two solutions to the off-site storage issue.  1) Do an 
>> archive to some sort of removable media.  Given the storage 
>> requirements, I don't see how it could be anything *other* than a hard 
>> drive.  If you were going to spend four figures to buy a big enough tape 
>> library, wouldn't you use it for backup directly?  Or 2) create some 
>> sort of RAID-1 configuration and break it regularly to swap out a drive 
>> and store it off-site.  Someone even recommended a 3-drive RAID-1, so 
>> the data stays redundant, but you can still break the array.  It doesn't 
>> change the workload on the array, however...
>>   
> 
> If you have a suitable offsite location with enough internet bandwidth, the
> low-maintenance way is to throw a vpn between sites and let an independent
> instance of backuppc run from there, backing up the same targets.  You
> might need to make the initial copy on the local LAN or perhaps add each
> new target on a Friday and let it run through the weekend to get started.
> 

When I was using BackupPC, I used "file_sync" (part of BackupPCd) to do a 
byte-level mirror (rsync-like) everynight from the BackupPC machine to the 
offiste mirror.

My BackupPC array was 1TB.

-- 
Roy Keene (Contractor)

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/backuppc-users
http://backuppc.sourceforge.net/


Re: [BackupPC-users] CGI scripts to manage removable hard drive media.

2007-01-18 Thread Roy Keene (Contractor)
Timothy J. Massey wrote:
> "Roy Keene (Contractor)" <[EMAIL PROTECTED]> wrote on 01/16/2007 
> 02:38:06 PM:
> 
>  > When I was using BackupPC, I used "file_sync" (part of BackupPCd) to 
> do a
>  > byte-level mirror (rsync-like) everynight from the BackupPC machine 
> to the
>  > offiste mirror.
> 
> Is this the same file_sync from OpenSync (http://www.opensync.org/) or 
> something else?  I did a google for BackuuPCd and came up with what I 
> imagine is your site (http://www.rkeene.org/oss/backuppcd/).  I 
> downloaded both listed tars, but could not find file_sync in them.  The 
> only logical reference I could come for file_sync was the OpenSync site 
> above.
> 
> Is BackupPCd a supported client for BackupPC?
> 
> Tim Massey
> 

That is my site.

$ tar -ztvf backuppcd-200603161528.tar.gz
...
-rw-r--r-- rkeene/users  10783 2006-03-11 11:11 
backuppcd-200603161528/tools/file_sync.c

BackupPCd is still in progress, and not recommended for production use (though 
I 
have used it for such in the past).

-- 
Roy Keene (Contractor)

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/backuppc-users
http://backuppc.sourceforge.net/


Re: [BackupPC-users] backup of windows 2003 .bkf files

2007-01-18 Thread Bryan Penney
>
> Hello List,
>
> I'm running into problems when trying to backup .bkf files from windows2003 
> backup. My
> normal backups are running fine. I'm using rsync over ssh for backups of our 
> linux boxes
> and samba for our windows boxes. 
>
> I didn't change anything about the samba config in the general config.pl.
>
>
> This is with a clean pool and new host.
> The current config.pl for the problem host:
>
>   $Conf{SmbShareName} = ['BACKUP$','thesitemachine'];
>   $Conf{SmbShareUserName} = '';
>   $Conf{SmbSharePasswd} = '';
>   $Conf{CompressLevel} = 0;
>
>   $Conf{BlackoutGoodCnt} = 10;
>   $Conf{BlackoutPeriods} = [
> {
> hourBegin =>  9.0,
> hourEnd   => 23.9,
> weekDays  => [0,1, 2, 3, 4, 5,6],
> },
>   ]; 
Looks like you need to set the XferMethod.  Add this to the host .pl file:

$Conf{XferMethod} = 'smb';

Bryan


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/backuppc-users
http://backuppc.sourceforge.net/


[BackupPC-users] Backup with Rsync doesn´t work

2007-01-18 Thread Simon Köstlin
Hi,

 

I want to use Rsync, but it doesn´t work and I don´t know what it could be.
Backuping with tar works fine. SSH Connection works too. Only Rsync makes
problems.

My host config file is this:

 

$Conf{XferMethod} = 'rsync';

$Conf{RsyncClientPath} = '/usr/bin/rsync';

$Conf{RsyncClientCmd} = '$sshPath -q -x -n -l backuppc $host nice -n 19 sudo
$rsyncPath $argList+';

$Conf{RsyncShareName} = '/home/backuppc';

 

And when I want to backup I get the following error LOG:

 

Running: /usr/bin/ssh -q -x -n -l backuppc 192.168.0.11 nice -n 19 sudo
/usr/bin/rsync --server --sender --numeric-ids --perms --owner --group
--devices --links --times --block-size=2048 --recursive --ignore-times .
/home/backuppc/ Xfer PIDs are now 12316 Got remote protocol 1936941392 Fatal
error (bad version): Password:

Read EOF: 

Tried again: got 0 bytes

fileListReceive() failed

Done: 0 files, 0 bytes

Got fatal error during xfer (fileListReceive failed) Backup aborted
(fileListReceive failed)

 

 

Greets

Simon Köstlin

 

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/backuppc-users
http://backuppc.sourceforge.net/


Re: [BackupPC-users] tar error 256

2007-01-18 Thread Bradley Alexander

- Craig Barratt <[EMAIL PROTECTED]> wrote:
[snip...]
> 
> What version of tar are you using?  Torsten reported that the
> newest version has changed the exit status in the case of
> certain relatively benign warnings that are therefore considerd
> fatal by BackupPC.

Both client and server are running GNU tar 1.16-2 from Debian/Sid.
 
> Could you also look through the XferLOG file and confirm that
> it is this same warning that tar is reporting?

It is confirmed. It said two files (/var/log/auth.log and /var/log/syslog) were 
being changed as they were being written...As well as /archive/mp3, which 
shouldn't be changing, and looks unchanged...

--b

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/backuppc-users
http://backuppc.sourceforge.net/


Re: [BackupPC-users] Backup with Rsync doesn't work

2007-01-18 Thread Holger Parplies
Hi,

Simon K?stlin wrote on 18.01.2007 at 20:14:12 [[BackupPC-users] Backup with 
Rsync doesn?t work]:
> [...]

please use normal ASCII quotes, not \xb4s or \264s as they're quite ugly to
read. And one copy of your posting is usually enough too ;-).

> And when I want to backup I get the following error LOG:
> 
> Running: /usr/bin/ssh -q -x -n -l backuppc 192.168.0.11 nice -n 19 sudo
> /usr/bin/rsync --server --sender --numeric-ids --perms --owner --group
> --devices --links --times --block-size=2048 --recursive --ignore-times .
> /home/backuppc/ Xfer PIDs are now 12316 Got remote protocol 1936941392 Fatal
> error (bad version): Password:
   ^

Either ssh or (more probably) sudo is asking you for a password. I doubt you
simply exchanged tar for rsync. Did you maybe add the 'sudo' and forget the
NOPASSWD flag in sudoers?

Regards,
Holger

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/backuppc-users
http://backuppc.sourceforge.net/


Re: [BackupPC-users] Simple question

2007-01-18 Thread Holger Parplies
Hi,

Timothy J. Massey wrote on 18.01.2007 at 11:15:18 [Re: [BackupPC-users] Simple 
question]:
> [EMAIL PROTECTED] wrote on 01/18/2007 
> 10:30:32 AM:

interesting attribution ;-).

>  > Exactly what line should I add to my config.pl to set the pool to 
> /mnt/sdb1/ ?
> 
> The short answer is, you don't.
> [...]
> just replace /var/lib/backuppc with a symlink.

Or, of course, either

- mount your partition on /var/lib/backuppc (which must then be a directory,
  as it currently is anyway; strictly speaking you don't even need to remove
  your old pool, you can mount your new partition right over it - I would
  not recommend that though, as it is bound to lead to confusion and waste
  space) instead of on /mnt/sdb1 . As you appear to be using a full partition,
  this is the most straightforward approach, unless you have some good
  reason to actually need it mounted on /mnt/sdb1.
- bind mount /mnt/sdb1 on /var/lib/backuppc . This would be a way to go if
  you had other things on the same partition and only wanted to use a sub-
  directory as TOPDIR (eg. /mnt/sdb1/backuppc - you'd then obviously bind
  mount /mnt/sdb1/backuppc on /var/lib/backuppc).

> chown backuppc:backuppc /var/lib/backuppc
> chmod 750 /var/lib/backuppc

These two also apply in both cases.

Regards,
Holger

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/backuppc-users
http://backuppc.sourceforge.net/


Re: [BackupPC-users] Syntax error?

2007-01-18 Thread Les Stott
James Ward wrote:
> I'm getting: - charles (Can't read PC's config file: Couldn't  
> execute /var/lib/backuppc/pc/charles/config.pl: syntax error at /var/ 
> lib/backuppc/pc/charles/config.pl line 4, near "$Conf")
>
> with this config file:
>
>
> $Conf{BackupFilesExclude} = ['/Volumes', '/Network', '/automount'];
> $Conf{RsyncClientCmd} = '$sshPath -q -x -l backups $host nice -n 19  
> sudo /Users/backups/rsyncSend $argList+';
> $Conf{BlackoutGoodCnt} = 0;
> $Conf{BlackoutPeriods} = [
>   {
>   hourBegin =>  7.0,
>   hourEnd   => 19.5,
>   weekDays  => [1, 2, 3, 4, 5],
>},
> ];
>
> I don't see anything wrong with it?
>
>   
hmmm.it all looks right.

i assume its just word wrapped and the line above starting with sudo 
belongs at the end of line 2? If it sees the sudo line as a separate 
line then thats where the problem is.

check the file for proper carriage returns (in vi do a :set list) and 
make sure it doesn't have control M's (dos2unix).

one other thingchange the order of lines when troubleshooting. move 
them around and watch the errors and see if they change line numbers. 
Often an error is in an earlier line but syntax checks only hit the 
later lines.

Good Luck,

Regards,

Les


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/backuppc-users
http://backuppc.sourceforge.net/


Re: [BackupPC-users] Syntax error?

2007-01-18 Thread Holger Parplies
Hi,

Les Stott wrote on 19.01.2007 at 11:27:56 [Re: [BackupPC-users] Syntax error?]:
> [...]
> hmmm.it all looks right.

that I agree with, but ...

> i assume its just word wrapped and the line above starting with sudo 
> belongs at the end of line 2? If it sees the sudo line as a separate 
> line then thats where the problem is.

Nope, it's within single quotes, and they're allowed to contain multiple
lines (in fact, that holds for all forms of quoting in Perl). In fact, you
can insert line breaks anywhere whitespace is allowed, because a newline
counts as whitespace.

$Conf
  {XferMethod} # you can even comment individual lines
=
  'smb'
;

looks ugly, but is perfectly valid. Perhaps you were thinking of TCL, where
the matter of line breaks (and especially comments) is a real pain?
That 'ssh' or 'nice' might choke on the embedded \n in the string is a
different matter.

> check the file for proper carriage returns (in vi do a :set list) and 
> make sure it doesn't have control M's (dos2unix).

Perl supports \r\n line breaks, which is (outside of strings ;-) really only
another instance of the above rule: blanks, newlines, returns, even form feeds
- it's all just whitespace.

Oh, ':set list' is something to remember. Thank you for that.

> one other thingchange the order of lines when troubleshooting. move 
> them around and watch the errors and see if they change line numbers. 
> Often an error is in an earlier line but syntax checks only hit the 
> later lines.

In my experience, Perl is surprisingly accurate. Of course, some errors are
only detectable later on. If you leave out the last single (or double) quote
in a program, the error will be detected at the end of the file (Perl is
quite helpful even in this case though). A missing semicolon will show up as
an error in the following line (or wherever the next statement begins). With
the code in question, I'm almost certain that a
'syntax error ... in line 4, near "$Conf"' (with "$Conf" being the first
five characters of line 4) means that there's some invisible
garbage behind the semicolon in line 3. In fact, the lines from the posting
give a "syntax OK" on my system, so whatever it is doesn't seem to have
survived cut&paste to the mail client.

Moving lines around is a good idea, but, frankly, in a script with four (4!)
statements, I'd say "delete line 3 (the whole line, including the line break)
and type it in again", and "test with
'perl -wc /var/lib/backuppc/pc/charles/config.pl', not by trying to run a
backup ;-)". Perhaps even test without line 3 (before re-inserting it),
presuming it's a statement of its own and not only part of one.

Regards,
Holger

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/backuppc-users
http://backuppc.sourceforge.net/


Re: [BackupPC-users] Syntax error?

2007-01-18 Thread Les Stott

Holger Parplies wrote:

Hi,

Les Stott wrote on 19.01.2007 at 11:27:56 [Re: [BackupPC-users] Syntax error?]:
  

[...]
hmmm.it all looks right.



that I agree with, but ...

  
i assume its just word wrapped and the line above starting with sudo 
belongs at the end of line 2? If it sees the sudo line as a separate 
line then thats where the problem is.



Nope, it's within single quotes, and they're allowed to contain multiple
lines (in fact, that holds for all forms of quoting in Perl). In fact, you
can insert line breaks anywhere whitespace is allowed, because a newline
counts as whitespace.

$Conf
  {XferMethod} # you can even comment individual lines
=
  'smb'
;

looks ugly, but is perfectly valid. Perhaps you were thinking of TCL, where
the matter of line breaks (and especially comments) is a real pain?
That 'ssh' or 'nice' might choke on the embedded \n in the string is a
different matter.

  
check the file for proper carriage returns (in vi do a :set list) and 
make sure it doesn't have control M's (dos2unix).



Perl supports \r\n line breaks, which is (outside of strings ;-) really only
another instance of the above rule: blanks, newlines, returns, even form feeds
- it's all just whitespace.

Oh, ':set list' is something to remember. Thank you for that.

  
one other thingchange the order of lines when troubleshooting. move 
them around and watch the errors and see if they change line numbers. 
Often an error is in an earlier line but syntax checks only hit the 
later lines.



In my experience, Perl is surprisingly accurate. Of course, some errors are
only detectable later on. If you leave out the last single (or double) quote
in a program, the error will be detected at the end of the file (Perl is
quite helpful even in this case though). A missing semicolon will show up as
an error in the following line (or wherever the next statement begins). With
the code in question, I'm almost certain that a
'syntax error ... in line 4, near "$Conf"' (with "$Conf" being the first
five characters of line 4) means that there's some invisible
garbage behind the semicolon in line 3. In fact, the lines from the posting
give a "syntax OK" on my system, so whatever it is doesn't seem to have
survived cut&paste to the mail client.

Moving lines around is a good idea, but, frankly, in a script with four (4!)
statements, I'd say "delete line 3 (the whole line, including the line break)
and type it in again", and "test with
'perl -wc /var/lib/backuppc/pc/charles/config.pl', not by trying to run a
backup ;-)". Perhaps even test without line 3 (before re-inserting it),
presuming it's a statement of its own and not only part of one.
  
Your quite right Holger! i'm no perl expert, (wish i was though!) so my 
suggestions were based on things ive seen in the past, not specific to 
perl. Was just trying to give some helpful hints to try and solve as all 
the syntax looks right.


Thanks for the info on perl. lets hope James can get this working.

Regards,

Les
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/backuppc-users
http://backuppc.sourceforge.net/