#1  
Old 23rd July 2008, 16:10
lordshadow lordshadow is offline
Member
 
Join Date: Apr 2008
Posts: 89
Thanks: 0
Thanked 0 Times in 0 Posts
Default BackupPC help needed

Hi,

I've been studying the howto on BackupPC for Debian Etch: http://www.howtoforge.com/linux_backuppc

However my problem is that Page3 part 4 describes how to implement the host file for DHCP and Netbios users.

I am running an Etch server which has samba server active however my linux clients don't run samba therefore they do not have nmbd installed.

Is there a way to use Rsync method withIP address of hosts only?
-Or should I create DNS entries for them in my DNS server?

For something like:

Code:
host        dhcp    user      moreUsers
IPaddress1     0     user1     anotheruser,athirduser
IPaddress2     1     user2     stillanotheruser

Also the server running BackupPC is my main server, everyone on the network works from /home partition. Therefore i need to backup local host but how can I do this if backup methods are only tar rsync and rsyncd??
<----------------------------------------------------------------------------------------------------->

My 2nd issue is that I want to store the backup data onto NAS! I have mounted it under /mnt so is there a way of changing the BackupPC save DIR from: /var/lib/backuppc

The NAS is currently formatted to FAT32 would this work with backupPC, ofcourse taking into account the file system restrictions such as incapability of >5GB file size? - Later I plan to use a RAID5 NAS array which will work in the same principle though not sure of filesystem yet but for now just to learn how to use the software :-)

Thanks

Last edited by lordshadow; 23rd July 2008 at 16:19.
Reply With Quote
Sponsored Links
  #2  
Old 25th July 2008, 17:52
lordshadow lordshadow is offline
Member
 
Join Date: Apr 2008
Posts: 89
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ok I have found after some background reading:

http://backuppc.wiki.sourceforge.net...hive+directory

Code:
Option 2
The BEST option is to change the archive directory in the config file
edit /etc/backuppc/config.pl and change the archive directory to /data

The archive directory is defined by $TopDir in config.pl. Unfortunately, the current version honors this value for host data, but the pool directories continue to use the default path that is hard-coded at install time. For now, in addition to changing config.pl, you will also need to edit lib/BackupPC/Lib.pm, and change the value in $topDir='/path...'.
However with this do I change $TopDir in config.pl as the location Lib.pm contains it adn reffers to it as TopDir??

Code:
sub new
{
    my $class = shift;
    my($topDir, $installDir, $noUserCheck) = @_;

    my $bpc = bless {
        TopDir  => $topDir || '/var/lib/backuppc',
        BinDir  => $installDir || '/usr/share/backuppc',
        LibDir  => $installDir || '/usr/share/backuppc',

<----------------------------------------------------------------------------------------------------->
Also as default BackupPC is set to backup localhost /etc DIR, however:

This is the error message I'm getting:

Code:
CheckHostAlive: returning 0.086
Running: /usr/bin/env LC_ALL=C /bin/tar -c -v -f - -C /etc --totals .
started full dump, share=/etc
Xfer PIDs are now 1976,1975
xferPids 1976,1975
cmdExecOrEval: about to exec /usr/bin/env LC_ALL=C /bin/tar -c -v -f - -C /etc --totals .
/bin/tar: .: Cannot open: Permission denied
Total bytes written: 10240 (10KiB, 28MiB/s)
/bin/tar: Error exit delayed from previous errors
Tar exited with error 512 () status
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)
cmdSystemOrEval: about to system /bin/ping -c 1 localhost
cmdSystemOrEval: finished: got output PING localhost.localdomain (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost.localdomain (127.0.0.1): icmp_seq=1 ttl=64 time=0.086 ms
<---------------------------------------------------------------------------------------------------->
And again if anyone knows anything with the hosts.pl file

as both these fail:

nmblookup <falko-desktop>

Code:
# nmblookup Vaio
WARNING: The "printer admin" option is deprecated
querying Vaio on 192.168.1.255
name_query failed to find name Vaio
----------------------------------------------------------------------------------------------------
# nmblookup -A 192.168.1.2
WARNING: The "printer admin" option is deprecated
Looking up status of 192.168.1.2
No reply from 192.168.1.2
The system Vaio is static at ip address 192.168.1.2 but hasn't got samba installed for nmbd - so what would be the next step without installing samba ?

Thanks
Reply With Quote
  #3  
Old 25th July 2008, 22:29
lordshadow lordshadow is offline
Member
 
Join Date: Apr 2008
Posts: 89
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Finally I have some good news! I manages to backup the Vaio; turns out the DNS records that backuppc was talking about are in the /etc/hosts file.

However I still can't backup localhost with tar method as default, issue is:

Code:
/bin/tar: .: Cannot open: Permission denied
Not sure why this is I may have to give backuppc permission to executre tar but not sure how to do that!

Also folder root, if anyone can help with that I would really apprieciate it!

Any help would be great thanks!
Reply With Quote
  #4  
Old 26th July 2008, 11:44
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,739 Times in 2,574 Posts
Default

Quote:
/bin/tar: .: Cannot open: Permission denied
I guess the error is related to your current directory (.), not /bin/tar.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 26th July 2008, 19:46
lordshadow lordshadow is offline
Member
 
Join Date: Apr 2008
Posts: 89
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yup the directory permissions seem to be the issue here, however since the server is a fully functional main server I would like to backup the whole / filesystem which means that I need to give backuppc rw access to everything.

How can I do this? Do I add it to group root with limited access?

<--------------------------------------------------------------------------------------------------------->

I also have a problem in backing up other machines as each time I try to execute a backup I get an xFER error:

Code:
Contents of file /var/lib/backuppc/pc/gx270d/XferLOG.bad.z, modified 2008-07-26 20:40:16 (Extracting only Errors)

Running: /usr/bin/ssh -q -x -l root gx270d /usr/bin/rsync --server --sender --numeric-ids --perms --owner --group --devices --links --times --block-size=2048 --recursive -D --ignore-times . /etc/
Xfer PIDs are now 28913
Got remote protocol 1953722184
Fatal error (bad version): Host key verification failed.

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)
This is strange as I got my first machine: vaio, working! The only thing I did differently was to copy the .ssh folder from vaio over to the current machine gx270d.

I also msised out this step:

Code:
su backuppc
ssh-keygen -t rsa
as I thought that by copying the .ssh folder of working vaio I would be able to skip this step all together as everything would be the same bar the IP address. I can ssh fine from server -> vaio and vaio -> server and the output of:

Code:
ssh -l root 192.168.0.213 whoami
is root

What's going wrong?
Reply With Quote
  #6  
Old 26th July 2008, 21:42
lordshadow lordshadow is offline
Member
 
Join Date: Apr 2008
Posts: 89
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Finally I managed to figurure out the ssh issue!

sudo -u backuppc /usr/share/backuppc/bin/BackupPC_dump -v -f backupclient

then it ask me to add the host fingerprints so that was fine - Few

<-------------------------------------------------------------------------------------------------------->

Now with regards to my localhost I added backuppc to group root however still no change in terms of backing up /etc dir so permissions still aren't good for user backuppc
Reply With Quote
  #7  
Old 28th July 2008, 02:17
lordshadow lordshadow is offline
Member
 
Join Date: Apr 2008
Posts: 89
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I just ahd a thought!

For my localhost; what would the significance of changing the PATH have?

Currently echo $PATH shows:

Code:
/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games
so if I added: $PATH=$PATH:/ would this help resolve the issue?
Reply With Quote
  #8  
Old 28th July 2008, 13:18
lordshadow lordshadow is offline
Member
 
Join Date: Apr 2008
Posts: 89
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

Ok wow now I managed to backup my localhost aswell!

I found this site just this morning: http://backuppc.sourceforge.net/faq/localhost.html

Then checking out the localuser.pl file in the /etc/backuppc directory

we have a line:

Code:
$Conf{TarClientCmd} = '/usr/bin/env LC_ALL=C $tarPath -c -v -f - -C $shareName'                        . ' --totals';
and all we need to do is a slight modification

Code:
$Conf{TarClientCmd} = '/usr/bin/sudo $tarPath -c -v -f - -C $shareName+ --totals';
then run this command:
Code:
visudo
and add
Code:
backuppc ALL = NOPASSWD: /bin/tar
in there and then restart backuppc!

Note that for localhost tar is used and not rsync or ssh, this is done because ssh and rsync are designed to work with remote machines rather then local ones as then you need to setup an RSA key pair to the same machine which is kind of pointless.

So majority of problems solved, now if I could only figure out why the backuppc root dir won't move?
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
odbc Chad Installation/Configuration 0 10th April 2008 01:43
Backuppc Installation Error nidhintomson Server Operation 2 9th January 2008 05:55
Backuppc Error on Install... matthewjamesnewton HOWTO-Related Questions 4 2nd November 2007 13:58
backuppc restore raptor2552 HOWTO-Related Questions 6 2nd July 2007 23:12
Help....package missing sbovisjb1 Installation/Configuration 3 31st March 2006 11:14


All times are GMT +2. The time now is 03:40.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.