[BackupPC-users] Backing up localhost nfs share with rsync

2011-07-21 Thread Ghislain

hi,

  I know this subject is sometime talked about but searching the list 
do not helped, a lot of testing neither so i try here in the hope 
someone will be able to help me.


  I try to backup a nfs mount share, for that i mount it on the 
backuppc server so i can backup it without using a silly


backuppc -- ssh -- server web = nfs = server web ssh -- backuppc

   loop and clog the network for nothing


   So i used this:



backupserver.mydomain.com.pl
# include default config
do '/etc/backuppc/config.pl';
#
# Path to rsync executable on the client
#
$Conf{RsyncClientPath} = '/usr/bin/sudo -n /usr/bin/rsync';

$Conf{XferMethod}   = 'rsync';
$Conf{RsyncShareName}   = ['/'];


# rsync client commands
$Conf{RsyncClientCmd}   = '$rsyncPath $argList+';
$Conf{RsyncClientRestoreCmd}= '$rsyncPath $argList+';


# repertoires a backuper
$Conf{BackupFilesOnly}= {
'/'  =  [ '/etc','/var/www' ],
};

# repertoire a exclure
$Conf{BackupFilesExclude} = {
'/' =  [ '**/archive/**' ],
};
---


  have the error  /Fatal error (bad version): Exec failed for 
/usr/bin/sudo -n /usr/bin/rsync/... :


*(root) sudo -u backuppc /usr/share/backuppc/bin/BackupPC_dump -v -f 
backupserver.mydomain.com*


...snip

full backup started for directory / (baseline backup #8)
started full dump, share=/
Running: /usr/bin/sudo\ -n\ /usr/bin/rsync --server --sender 
--numeric-ids --perms --owner --group -D --links --hard-links --times 
--recursive --checksum-seed=32761 --protocol=28 --ignore-times . /

Xfer PIDs are now 16249
xferPids 16249
Got remote protocol 1667594309

*Fatal error (bad version): Exec failed for /usr/bin/sudo -n 
/usr/bin/rsync --server --sender --numeric-ids --perms --owner --group 
-D --links --hard-links --times --recursive --checksum-seed=32761 
--protocol=28 --ignore-times . /*




 i  have my sudoers to:

# Cmnd alias specification
Cmnd_Alias  BACKUPLOCAL  =   /usr/bin/rsync,\
 /bin/false

# User privilege specification
backuppcALL = (root)NOPASSWD:   BACKUPLOCAL

   the proces of backuppc works on the right user:

backuppc 13791  0.0  0.0  63452 13432 ?S09:25   0:01 
/usr/bin/perl /usr/share/backuppc/bin/BackupPC -d
backuppc 13793  0.0  0.0  43948  7020 ?S09:25   0:00 
/usr/bin/perl /usr/share/backuppc/bin/BackupPC_trashClean




  and command line works well:

*(root)  sudo -u backuppc /usr/bin/sudo   /usr/bin/rsync --version*
rsync  version 3.0.7  protocol version 30
Copyright (C) 1996-2009 by Andrew Tridgell, Wayne Davison, and others.
Web site: http://rsync.samba.org/
snip



  i have tested quite a lot of configuration but i really do not find 
where the problem is. I tried to add --protocol=28/29 to rsync but no 
change to the result so far. Any ideas on how to debug this ?



best regards,
Ghis
--
5 Ways to Improve  Secure Unified Communications
Unified Communications promises greater efficiencies for business. UC can 
improve internal communications as well as offer faster, more efficient ways
to interact with customers and streamline customer service. Learn more!
http://www.accelacomm.com/jaw/sfnl/114/51426253/___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/


Re: [BackupPC-users] Backing up localhost nfs share with rsync

2011-07-21 Thread Les Mikesell
On 7/21/11 6:38 AM, Ghislain wrote:

 started full dump, share=/
 Running: /usr/bin/sudo\ -n\ /usr/bin/rsync --server --sender --numeric-ids
 --perms --owner --group -D --links --hard-links --times --recursive
 --checksum-seed=32761 --protocol=28 --ignore-times . /
 Xfer PIDs are now 16249
 xferPids 16249
 Got remote protocol 1667594309

That usually means there there is some output from something in /etc/profile, 
/etc/bashrc or ~/.bashrc  (a message of the day, etc.).  Normal rsync can 
tolerate that, but with backuppc, there must be nothing sent before rsync 
starts.

-- 
   Les Mikesell
lesmikes...@gmai.com

--
5 Ways to Improve  Secure Unified Communications
Unified Communications promises greater efficiencies for business. UC can 
improve internal communications as well as offer faster, more efficient ways
to interact with customers and streamline customer service. Learn more!
http://www.accelacomm.com/jaw/sfnl/114/51426253/
___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/


Re: [BackupPC-users] Backing up localhost nfs share with rsync

2011-07-21 Thread Holger Parplies
Hi,

Ghislain wrote on 2011-07-21 13:38:22 +0200 [[BackupPC-users] Backing up 
localhost nfs share with rsync]:
 [...]
 backupserver.mydomain.com.pl
 # include default config
 do '/etc/backuppc/config.pl';

unrelated to your problem, but this is pointless. The global config is
included anyway. You can use 'do ...' to include a config for a group of hosts
(e.g. do '/etc/backuppc/all_my_servers.pl';), but for the global config this
is meaningless.

 #
 # Path to rsync executable on the client
 #
 $Conf{RsyncClientPath} = '/usr/bin/sudo -n /usr/bin/rsync';

This is wrong, as you see in the error message. The RsyncClientPath is
/usr/bin/rsync. The sudo comes into the game in RsyncClientCmd.
As a side note, the '-n' option to sudo is sort of pointless. You need to
configure sudo correctly. '-n' just makes it fail in a perhaps more obvious
way. Adding the '-n' is sort of saying I'm expressly preparing for this to be
wrong. Use it for debugging, but then remove it (well, my opinion).

 [...]
 # rsync client commands
 $Conf{RsyncClientCmd}   = '$rsyncPath $argList+';

$Conf{RsyncClientCmd} = '/usr/bin/sudo $rsyncPath $argList';

Note that I removed the '+'. sudo does *not* add an additional shell level, so
you don't want extra quoting.

 $Conf{RsyncClientRestoreCmd}= '$rsyncPath $argList+';

Same here. Add 'sudo', remove '+'.

 $Conf{BackupFilesExclude} = {
 '/' =  [ '**/archive/**' ],
 };

If you're excluding the directory 'archive', you're implicitly excluding
everything beneath it. Do you *want* the directory itself (without content)?
Using '**/archive/' should otherwise be equivalent (and if you *do* want the
directory itself, '**/archive/*' should be sufficient).

   have the error  /Fatal error (bad version): Exec failed for 
 /usr/bin/sudo -n /usr/bin/rsync/... :
 [...]
 full backup started for directory / (baseline backup #8)
 started full dump, share=/
 Running: /usr/bin/sudo\ -n\ /usr/bin/rsync --server --sender 
 --numeric-ids --perms --owner --group -D --links --hard-links --times 
 --recursive --checksum-seed=32761 --protocol=28 --ignore-times . /

You likely don't have a command 'sudo -n /usr/bin/rsync' in /usr/bin, or
rather, you probably don't have a directory 'sudo -n ' in /usr/bin, which
in turn contains 'rsync' within subdirectories 'usr/bin'.

The incorrect escaping is due to the fact that you specified RsyncClientPath
incorrectly above.

Apart from that, everything looks good.

Hope that helps.

Regards,
Holger

--
5 Ways to Improve  Secure Unified Communications
Unified Communications promises greater efficiencies for business. UC can 
improve internal communications as well as offer faster, more efficient ways
to interact with customers and streamline customer service. Learn more!
http://www.accelacomm.com/jaw/sfnl/114/51426253/
___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/


Re: [BackupPC-users] Backing up localhost nfs share with rsync

2011-07-21 Thread Ghislain

Le 21/07/2011 16:46, Holger Parplies a écrit :

Hi,

Ghislain wrote on 2011-07-21 13:38:22 +0200 [[BackupPC-users] Backing up 
localhost nfs share with rsync]:

[...]
backupserver.mydomain.com.pl
# include default config
do '/etc/backuppc/config.pl';

unrelated to your problem, but this is pointless. The global config is
included anyway. You can use 'do ...' to include a config for a group of hosts
(e.g. do '/etc/backuppc/all_my_servers.pl';), but for the global config this
is meaningless.


oh yes will remove that thanks. Should not change anything but is 
pointless if the config is allways added so better keep clean :)





#
# Path to rsync executable on the client
#
$Conf{RsyncClientPath} = '/usr/bin/sudo -n /usr/bin/rsync';

This is wrong, as you see in the error message. The RsyncClientPath is
/usr/bin/rsync. The sudo comes into the game in RsyncClientCmd.
As a side note, the '-n' option to sudo is sort of pointless. You need to
configure sudo correctly. '-n' just makes it fail in a perhaps more obvious
way. Adding the '-n' is sort of saying I'm expressly preparing for this to be
wrong. Use it for debugging, but then remove it (well, my opinion).


  Moving sudo on the command instead of the path seems to make it as 
the backup is running fine right now (willl have to wait for the end to 
be sure but at least it des not fail 10 seconds after i launch it). 
Thanks for pointing this.



  For the -n it just specify to sudo that nothing should need 
interaction and provide a corresponding message. I do not think it is in 
any case a problem to let it like this. For me it is just to say  i am 
not expecting any interaction but if you need one then warn me about 
this explicitly without trying to ask me for a password ;-)


I thnik this way sudo fail more nicely to backuppc than with the timeout 
of the prompt when it fail, even if it should not but /Your Milage/ May 
Vary.




[...]
# rsync client commands
$Conf{RsyncClientCmd}   = '$rsyncPath $argList+';

$Conf{RsyncClientCmd} = '/usr/bin/sudo $rsyncPath $argList';

Note that I removed the '+'. sudo does *not* add an additional shell level, so
you don't want extra quoting.


$Conf{RsyncClientRestoreCmd}= '$rsyncPath $argList+';

Same here. Add 'sudo', remove '+'.



ok i just left it from the exemple i do not even know what this does :)
surely it was from the ssh part.




   have the error  /Fatal error (bad version): Exec failed for
/usr/bin/sudo -n /usr/bin/rsync/... :
[...]
full backup started for directory / (baseline backup #8)
started full dump, share=/
Running: /usr/bin/sudo\ -n\ /usr/bin/rsync --server --sender
--numeric-ids --perms --owner --group -D --links --hard-links --times
--recursive --checksum-seed=32761 --protocol=28 --ignore-times . /

You likely don't have a command 'sudo -n /usr/bin/rsync' in /usr/bin, or
rather, you probably don't have a directory 'sudo -n ' in /usr/bin, which
in turn contains 'rsync' within subdirectories 'usr/bin'.

The incorrect escaping is due to the fact that you specified RsyncClientPath
incorrectly above.

Apart from that, everything looks good.

Hope that helps.


yes it helped a lot , thanks for your help on this !

--

Cordialement,
Ghislain

--
5 Ways to Improve  Secure Unified Communications
Unified Communications promises greater efficiencies for business. UC can 
improve internal communications as well as offer faster, more efficient ways
to interact with customers and streamline customer service. Learn more!
http://www.accelacomm.com/jaw/sfnl/114/51426253/___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/


[BackupPC-users] Backing Up localhost i.e backuppc server itself

2008-08-21 Thread Ishan Patel
Hi Friends

Thanks in advance !

I have configured BackupPC for my company's network and its works fine for
linux clients and i am sure that some day i will make it work for windows
clients also ..

But at this point in time i have some problem with Backuppc.

i have confirured backuppc on Live Server and i have added another live
server as its client and it works fine ! But when i have added the localhost
itself then it not gud all all ! and i am getting angry i guess with the
errors !


Contents of file /data/BackupPC/pc/67.205.74.115/LOG.082008, modified
2008-08-21 05:16:37

2008-08-21 05:16:31 full backup started for directory /etc
2008-08-21 05:16:32 Got fatal error during xfer (fileListReceive failed)
2008-08-21 05:16:37 Backup aborted (fileListReceive failed)




Contents of file /data/BackupPC/pc/67.205.74.115/XferLOG.bad.z, modified
2008-08-21 05:16:37 (Extracting only Errors)

full backup started for directory /etc
Running: /usr/bin/ssh -q -x -l backuppc 67.205.74.115 sudo
/usr/bin/rsync --server --sender --numeric-ids --perms --owner --group
-D --links --hard-links --times --block-size=2048 --recursive
--ignore-times . /etc/
Xfer PIDs are now 11764
Got remote protocol 1868854643
Fatal error (bad version): sudo:
Read EOF: Connection reset by peer
Tried again: got 0 bytes
fileListReceive() failed
Done: 0 files, 0 bytes
Got fatal error during xfer (fileListReceive failed)
Backup aborted (fileListReceive failed)
Not saving this as a partial backup since it has fewer files than the
prior one (got 0 and 0 files versus 0)



One more thing

in my confiruration -D is already there inplace of --devices !

So now what cousing this problem i dont know !

Help Me out !
-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/


Re: [BackupPC-users] Backing Up localhost i.e backuppc server itself

2008-08-21 Thread Ishan Patel
ok here is the intented output . .


[EMAIL PROTECTED] BackupPC]# /etc/init.d/backuppc restart
Shutting down BackupPC:[  OK  ]
Starting BackupPC: [  OK  ]
[EMAIL PROTECTED] BackupPC]# su - backuppc
[EMAIL PROTECTED] ~]$ /usr/bin/ssh -q -x -l backuppc
67.205.74.115sudo /usr/bin/rsync --server --sender --numeric-ids
--perms --owner --group
-D --links --hard-links --times --block-size=2048 --recursive --ignore-times
. /etc/
sudo: sorry, you must have a tty to run sudo
[EMAIL PROTECTED] ~]$


This is may be error !
sudo: sorry, you must have a tty to run sudo
-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/


Re: [BackupPC-users] Backing Up localhost i.e backuppc server itself

2008-08-21 Thread Nils Breunese (Lemonbit)
Ishan Patel wrote:

 ok here is the intented output . .

 [EMAIL PROTECTED] BackupPC]# /etc/init.d/backuppc restart
 Shutting down BackupPC:[  OK  ]
 Starting BackupPC: [  OK  ]
 [EMAIL PROTECTED] BackupPC]# su - backuppc
 [EMAIL PROTECTED] ~]$ /usr/bin/ssh -q -x -l backuppc  
 67.205.74.115 sudo /usr/bin/rsync --server --sender --numeric-ids -- 
 perms --owner --group -D --links --hard-links --times --block- 
 size=2048 --recursive --ignore-times . /etc/
 sudo: sorry, you must have a tty to run sudo
 [EMAIL PROTECTED] ~]$


 This is may be error !
 sudo: sorry, you must have a tty to run sudo

Comment out 'requiretty' in your sudo configuration.

Nils Breunese.

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/


Re: [BackupPC-users] backing up localhost fails

2007-12-08 Thread Scott Waye
scott wrote:
 Craig Barratt wrote:

 Scott writes:

  

 TarClientCmd is

 /usr/bin/sudo /bin/tar -c -v -f - -C $shareName+ --totals

 and /bin/tar --version gives:

 tar (GNU tar) 1.15.92

 The backup fails with:

 2007-12-04 22:09:50 full backup started for directory /data
 2007-12-04 22:27:23 Got fatal error during xfer (No files dumped for
 share /data)
 2007-12-04 22:27:28 Backup aborted (No files dumped for share /data)
   

 What is in the XferLOG.bad file?


  

 It starts with:

 Running: /usr/bin/sudo /usr/local/bin/tarCreate -v -f - -C /data 
 --totals .
 full backup started for directory /data
 Xfer PIDs are now 23492,23491
 apache2/
 assp/
 snipped

Turns out that while I thought I had upgraded my version of tar I had 
actually downgraded it to an earlier version which, when given the -v 
option, writes the verbose output to stdout and corrupts the archive.  
I've upgraded tar and now its fine, unless you do -f /dev/stdout instead 
of -f - as the former will cause the -v output to go to stdout as well.


-
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/


Re: [BackupPC-users] backing up localhost fails

2007-12-05 Thread scott
Craig Barratt wrote:

Scott writes:

  

TarClientCmd is

/usr/bin/sudo /bin/tar -c -v -f - -C $shareName+ --totals

and /bin/tar --version gives:

tar (GNU tar) 1.15.92

The backup fails with:

2007-12-04 22:09:50 full backup started for directory /data
2007-12-04 22:27:23 Got fatal error during xfer (No files dumped for
share /data)
2007-12-04 22:27:28 Backup aborted (No files dumped for share /data)



What is in the XferLOG.bad file?


  

It starts with:

Running: /usr/bin/sudo /usr/local/bin/tarCreate -v -f - -C /data --totals .
full backup started for directory /data
Xfer PIDs are now 23492,23491
apache2/
assp/
assp/spam/
assp/spam/3242
assp/spam/2924
assp/spam/1809
assp/spam/899
assp/spam/607
assp/spam/1899

which is confusing as I've removed the tarCreate wrapper so I've no idea 
where its picking that up from.  In desperation I rebooted the server, 
but it still comes up.  The relevant section from the machine.pl file is:

$Conf{XferMethod} = 'tar';
$Conf{TarClientCmd} = '/usr/bin/sudo /bin/tar -c -v -f - -C $shareName+ 
--totals';
$Conf{TarIncrArgs} = '--newer=$incrDate $fileList';

Anyway, the XferLOG.bad continues with file names in assp/spam until 
around line 100 where it changes to:

assp/spam/3552
assp/spam/1666
  create d 755   0/0   0 .
  create d 755   0/0   0 apache2
  create d 755  99/0   0 assp
  create d 755  99/0   0 assp/spam
  pool 600 99/99   10066 assp/spam/3242
  pool 600 99/99   10007 assp/spam/2924
  pool 600 99/99   10014 assp/spam/1809
  pool 600 99/991566 assp/spam/899

I get around 60 of these lines beginning with pool and then from there 
it alternates between just the file names and the pool lines.  I guess 
this is it finding the file in the pool.

The first directory /data then finishes and it starts on the second, 
where it seems to go wrong:

  pool 554   0/03999 www/backuppc/cgi-bin/BackupPC_Admin
tarExtract: Done: 0 errors, 116182 filesExist, 14267486394 sizeExist, 
11865427525 sizeExistComp, 124095 filesTotal, 14494799736 sizeTotal
Running: /usr/bin/sudo /usr/local/bin/tarCreate -v -f - -C /usr --totals .
full backup started for directory /usr
Xfer PIDs are now 8150,8149
tarExtract: ./
tarExtract: ./bin/
tarExtract: ./bin/X11
tarExtract: ./bin/indent
tarExtract: ./: checksum error at
  create 0   0/0   0
tarExtract: ./bin/
tarExtract: ./bin/X11
tarExtract: ./bin/indent
tarExtract: .
tarExtract: : checksum error at
tarExtract: Can't open /backup/pc/rivera/new/f%2fusr/ for empty output
  create 0   0/0   0 .
tarExtract: : checksum error at
tarExtract: Can't open /backup/pc/rivera/new/f%2fusr/ for empty output
  create 0   0/0   0 .
tarExtract: : checksum error at
tarExtract: Can't open /backup/pc/rivera/new/f%2fusr/ for empty output
  create 0   0/0   0 .

I think I have plenty of space, my backups go to /backup:

df -k:
Filesystem   1k-blocks  Used Available Use% Mounted on
/dev/hda2479731472  43278360 412084116  10% /
/dev/hdc2307402872  27090588 264697104  10% /backup

Thanks for looking.



-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/


[BackupPC-users] backing up localhost fails

2007-12-04 Thread Scott Waye
Hi,

I have BackupPC version 3.1 and I'm trying to backup the localhost using 
tar.

TarClientCmd is

/usr/bin/sudo /bin/tar -c -v -f - -C $shareName+ --totals

and /bin/tar --version gives:

tar (GNU tar) 1.15.92

The backup fails with:

2007-12-04 22:09:50 full backup started for directory /data
2007-12-04 22:27:23 Got fatal error during xfer (No files dumped for 
share /data)
2007-12-04 22:27:28 Backup aborted (No files dumped for share /data)

and the funny thing is that under the backup directory 
pc/hostname/new/f%2fdata all the directories have names which look like 
the contents of the files, so for example I have from ls -l things like:

drwxr-x---3 backuppc users4096 Dec  4 22:44 
f59-1%0d%0aMETA\ content\=3DMSHTML\ 6.00.2900.2180\ 
name\=3DGENERATOR%0d%0aSTYLE/

This looks like the contents of an email and one of the first 
directories it should be backing up is my spam database.  This looks 
wrong to me as my other machines which I have backed up (Windows using 
cygwin/rsync) have directories which match the actual directories on the 
clients (e.g. drwxr-x---   48 backuppc users4096 Dec  4 20:09 
fMy\ Documents).

I had a look through the archives but couldn't find anything to match 
this.  Thanks if anyone can point me into doing some diagnostics.

--
Scott






-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/


Re: [BackupPC-users] backing up localhost

2007-05-14 Thread M. Sabath

Hi all,

I don't know what it was, but after deleted the contens of the pool
directory the backup of localhost works.

Since I only back up /etc I use the same method like with the clients
and connet to localhost through ssh.

Markus


Am Sonntag, den 13.05.2007, 22:27 +0200 schrieb M. Sabath:
 I set up backuppc.
 
 It works with the clients but not with localhost.
 
 Empty folders and some few files do get backed up. 
 
 
 The command:
 /usr/share/backuppc/bin/BackupPC_dump -v -f localhost 
 
 
 commes up with entries like:
 
 tarExtract: Can't link /var/lib/backuppc/pc/localhost/new/f%
 2fetc/fhdparm.conf
 to /var/lib/backuppc/pool/1/d/5/1d5a89be4b5f331ad4eaedd493e5eeff
 
 
 I tried:
 http://backuppc.sourceforge.net/faq/localhost.html
 
 but it doesn't help. The folders stay empty.
 
 
 I use Ubuntu 7.04 with backuppc 2.1.2
 (the root user I activated)



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/backuppc-users
http://backuppc.sourceforge.net/


[BackupPC-users] backing up localhost

2007-05-13 Thread M. Sabath
I set up backuppc.

It works with the clients but not with localhost.

Empty folders and some few files do get backed up. 


The command:
/usr/share/backuppc/bin/BackupPC_dump -v -f localhost 


commes up with entries like:

tarExtract: Can't link /var/lib/backuppc/pc/localhost/new/f%
2fetc/fhdparm.conf
to /var/lib/backuppc/pool/1/d/5/1d5a89be4b5f331ad4eaedd493e5eeff


I tried:
http://backuppc.sourceforge.net/faq/localhost.html

but it doesn't help. The folders stay empty.


I use Ubuntu 7.04 with backuppc 2.1.2
(the root user I activated)


Thank you

Markus


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/backuppc-users
http://backuppc.sourceforge.net/


Re: [BackupPC-users] Backing up localhost - permission question

2007-04-15 Thread Holger Parplies
Hi,

Eric Snyder wrote on 14.04.2007 at 21:27:16 [Re: [BackupPC-users] Backing up 
localhost - permission question]:
 Carl Wilhelm Soderstrom wrote:
  [...]
  I also have this entry in /etc/sudoers:
  backuppc ALL=NOPASSWD: /bin/tar 
 
  the suggestion to make that 
  backuppc ALL=NOPASSWD: /bin/tar -c
 
  is a good one tho.
 Thanks. I have done everything and I get the folowing result:
 [..]
 Running: /usr/bin/env LC_ALL=C /usr/bin/sudo /usr/bin/tar -c -v -f - -C 
 /etc --totals .
 full backup started for directory /etc
 Xfer PIDs are now 2025,2024
 
 We trust you have received the usual lecture from the local System
 Administrator. It usually boils down to these three things:
 [ skipped 3 lines ]
 Password:

that's sudo showing the 'first time lecture' and asking for a password,
meaning the line does not match one with the 'NOPASSWD' flag. If you
*exactly* followed Carl's post, then you'll have to replace '/bin/tar'
with '/usr/bin/tar' in /etc/sudoers (or change your $Conf{TarClientPath} to
'/bin/tar' instead of '/usr/bin/tar' if appropriate - one of those might be
a soft link to the other, which would probably let sudo be picky about which
you may execute and which you may not, meaning your line in /etc/sudoers and
your $Conf{TarClientPath} would have to match, even though it's the same
executable, really; if you only have tar in one of (/bin, /usr/bin), you'll
have to use that and adapt /etc/sudoers, obviously).

If in doubt, try it out by hand:

# su backuppc
% sudo /bin/tar -c -f /tmp/foo.tar name.of.a.small.file

That way you can more easily play around with the command and see what
happens.

Aside from that, '/usr/bin/env LC_ALL=C /usr/bin/sudo ...' may or may not do
what you want, because sudo is quite careful about which environment
variables it passes on and which it doesn't. You should really only need to
set LC_ALL if your system default language is not English, because BackupPC
expects messages from tar to be in English (though I'm not sure if an 'exotic'
character encoding might make it necessary to set LC_ALL even with English as
default language).

Regards,
Holger

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
BackupPC-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/backuppc-users
http://backuppc.sourceforge.net/


Re: [BackupPC-users] Backing up localhost - permission question

2007-04-14 Thread Eric Snyder


Carl Wilhelm Soderstrom wrote:
 Here's the localhost.pl file that I use.

 #
 # Local server backup of /etc as user backuppc
 #
 $Conf{XferMethod} = 'tar';

 $Conf{TarShareName} = ['/etc'];

 $Conf{TarClientCmd} = '/usr/bin/env LC_ALL=C /usr/bin/sudo $tarPath' 
 . ' -c -v -f - -C $shareName --totals';

 # let it back itself up anytime it wants to.
 $Conf{BlackoutPeriods} = [];


 I also have this entry in /etc/sudoers:
 backuppc ALL=NOPASSWD: /bin/tar 

 the suggestion to make that 
 backuppc ALL=NOPASSWD: /bin/tar -c

 is a good one tho.

   
Thanks. I have done everything and I get the folowing result:
Contents of file /data/BackupPC/pc/slacker/XferLOG.bad.z, modified 
2007-04-14 21:20:47 (Extracting only Errors)

Running: /usr/bin/env LC_ALL=C /usr/bin/sudo /usr/bin/tar -c -v -f - -C 
/etc --totals .
full backup started for directory /etc
Xfer PIDs are now 2025,2024

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:
[ skipped 3 lines ]
Password:
tarExtract: Done: 0 errors, 0 filesExist, 0 sizeExist, 0 sizeExistComp, 
0 filesTotal, 0 sizeTotal
Got fatal error during xfer (No files dumped for share /etc)
Backup aborted (No files dumped for share /etc)

My localhost.pl file is as follows:

$Conf{XferMethod} = 'tar';
$Conf{TarShareName} = [
  '/etc'
];
$Conf{TarClientCmd} = '/usr/bin/env LC_ALL=C /usr/bin/sudo $tarPath'
. ' -c -v -f - -C $shareName --totals';
$Conf{SmbShareName} = [
  'backupshare'
];
$Conf{SmbSharePasswd} = 'removed';
$Conf{SmbShareUserName} = 'removed';

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
BackupPC-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/backuppc-users
http://backuppc.sourceforge.net/


Re: [BackupPC-users] Backing up localhost - permission question

2007-04-12 Thread Carl Wilhelm Soderstrom

Here's the localhost.pl file that I use.

#
# Local server backup of /etc as user backuppc
#
$Conf{XferMethod} = 'tar';

$Conf{TarShareName} = ['/etc'];

$Conf{TarClientCmd} = '/usr/bin/env LC_ALL=C /usr/bin/sudo $tarPath' 
. ' -c -v -f - -C $shareName --totals';

# let it back itself up anytime it wants to.
$Conf{BlackoutPeriods} = [];


I also have this entry in /etc/sudoers:
backuppc ALL=NOPASSWD: /bin/tar 

the suggestion to make that 
backuppc ALL=NOPASSWD: /bin/tar -c

is a good one tho.

-- 
Carl Soderstrom
Systems Administrator
Real-Time Enterprises
www.real-time.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.phpp=sourceforgeCID=DEVDEV
___
BackupPC-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/backuppc-users
http://backuppc.sourceforge.net/


[BackupPC-users] Backing up localhost - permission question

2007-04-11 Thread Eric Snyder

Hello all:

I am setting up localhost to be backed up. In the help file at 
http://backuppc.sourceforge.net/faq/localhost.html there is the 
following blurb:


Make sure this script and all parent directories have no write 
permission. Then remove the -c from $Conf{TarClientCmd} 
http://backuppc.sourceforge.net/faq/BackupPC.html#item__conf_tarclientcmd_ 
and change the tar path:


Is this write permission for owner, group, others or all three?

Thanks,
Eric Snyder
-
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.phpp=sourceforgeCID=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] Backing up localhost - permission question

2007-04-11 Thread Holger Parplies
Hi,

Eric Snyder wrote on 11.04.2007 at 20:15:50 [[BackupPC-users] Backing up 
localhost - permission question]:
 I am setting up localhost to be backed up. In the help file at 
 http://backuppc.sourceforge.net/faq/localhost.html there is the 
 following blurb:
 
 Make sure this script and all parent directories have no write 
 permission. Then remove the -c from $Conf{TarClientCmd} 
 http://backuppc.sourceforge.net/faq/BackupPC.html#item__conf_tarclientcmd_ 
 and change the tar path:
 
 Is this write permission for owner, group, others or all three?

whatever makes sense (see below :). The point is that anyone with write
permission to - and that's the important part - *either* script *or* *any*
parent directory would be able to replace the script by something of his/her
own creation, thus not only circumventing the supposed restriction (context:
limiting priviledges given to the BackupPC user through sudo), but rather
giving *anyone at all* with such write permission the possibility to run
*any command* as root, if he can only get BackupPC to run (his modified
version of) the script (i.e. initiate a backup or wait for a scheduled one).

Owner write permission is not something you can meaningfully remove since
the owner can chmod() a file/directory however he likes anyway (except
maybe on ext2/3 if you make the file/dir immutable ...).

This probably means that all parent directories and the script itself should
be *owned by root* and *not writeable* for group and others. Actually, I'd
recommend not using that approach at all. If I'm not completely mistaken
[read: it is documented and proves to work that way on Debian sarge ;-],
you can achieve the same with a sudoers line like

backuppc ALL = NOPASSWD: /bin/tar -c *

You just need to make sure you always pass the -c as first and separate
argument to tar (in $Conf{TarClientCmd}), as the following will all *not*
match, because in all cases the first argument to tar is not '-c':

/bin/tar -v -c ...
/bin/tar -cf ...
/bin/tar c -f ...

Note that automatic restores through the web interface will no longer work,
as BackupPC cannot initiate the TarClientRestoreCmd (tar -x).


Was your question related to the thread you are referencing
(BackupPC_link errors)?

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.phpp=sourceforgeCID=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] backing up localhost

2005-11-05 Thread Wolfgang Karall
On Fri, 2005-11-04 at 14:02 -0500, Ken McGonigal wrote:
 I am using Backuppc and would like to backup all the directories
 on / . At the moment Backupc is only backing up the clients and /etc
 on localhost. How can I change this? I can't seem to find any docs on
 this particular problem. 

That's a FAQ, see http://backuppc.sourceforge.net/faq/localhost.html

Regards
WK
-- 
http://linux.spiney.org/debian_gnu_linux_on_an_ibm_thinkpad_t43p



---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/backuppc-users
http://backuppc.sourceforge.net/