Fedora 9 and BackupPC howto?
FedoraForum.org - Fedora Support Forums and Community
Page 1 of 2 1 2 LastLast
Results 1 to 15 of 17
  1. #1
    Join Date
    Apr 2005
    Posts
    38

    Fedora 9 and BackupPC howto?

    Does anyone know if there is a HOWTO available anywhere that explains how to get the BackupPC package working on Fedora 9? I'm not talking about downloading it from the BackupPC web page and setting it up from there, but by getting the Fedora 9 RPM package set up and working.

    I've installed the RPM and started BackupPC from the init.d script (and it's set to start on boot in all run levels), but there's no web interface that I can find. Any help or a HOWTO that explains this would be appreciated.

  2. #2
    Join Date
    Apr 2005
    Posts
    38
    **BUMP**

    Anyone?

  3. #3
    Join Date
    Jun 2008
    Location
    Brno, Czech republic
    Age
    26
    Posts
    62
    Quote Originally Posted by DWolfman
    Does anyone know if there is a HOWTO available anywhere that explains how to get the BackupPC package working on Fedora 9? I'm not talking about downloading it from the BackupPC web page and setting it up from there, but by getting the Fedora 9 RPM package set up and working.

    I've installed the RPM and started BackupPC from the init.d script (and it's set to start on boot in all run levels), but there's no web interface that I can find. Any help or a HOWTO that explains this would be appreciated.
    Areca is more better than BackupPC, so use it instead. If you want to use BackupPC, I think it's a part of basic installation on your DVD. I don't know anything about the web interface. From the head I can say you probably need to look into readme for the port it uses and allow it in the firewall. Also, do you have Apache configured and running?

  4. #4
    Join Date
    Jun 2005
    Posts
    47
    The web address (if installed from rpm) should be http://localhost/BackupPC (note the caps). Make sure the service is running before you try that address though.

  5. #5
    Join Date
    Apr 2005
    Posts
    38
    Quote Originally Posted by dancuc
    Areca is more better than BackupPC, so use it instead. If you want to use BackupPC, I think it's a part of basic installation on your DVD. I don't know anything about the web interface. From the head I can say you probably need to look into readme for the port it uses and allow it in the firewall. Also, do you have Apache configured and running?
    OK, I'll take a look at that one.

  6. #6
    Join Date
    Apr 2005
    Posts
    38
    Quote Originally Posted by xawen
    The web address (if installed from rpm) should be http://localhost/BackupPC (note the caps). Make sure the service is running before you try that address though.
    That's the thing, the service is running but the web page won't come up. I so have Apache running as it is serving my other web stuff just fine. However, in order to get that stuff working right I basically copied over the Apache conf files from my old installation in place of the new ones from the current install. Is that probably why I can't get the BackupPC web page to come up?

  7. #7
    Join Date
    Jun 2005
    Posts
    47
    That's probably it... Did you copy the configs from the old install after installing BackupPC? The BackupPC RPM puts a config file into /etc/httpd/conf.d for the admin web site.

    Try removing BackupPC and installing it again.

  8. #8
    oneofmany Guest
    personally i use cron, cpio and tar

  9. #9
    Join Date
    Apr 2005
    Posts
    38
    Quote Originally Posted by xawen
    That's probably it... Did you copy the configs from the old install after installing BackupPC? The BackupPC RPM puts a config file into /etc/httpd/conf.d for the admin web site.

    Try removing BackupPC and installing it again.
    Yes, I had copied my main Apache config file (/etc/httpd/conf/httpd.conf) from the old install.

    BackupPC was originally loaded by Fedora 9's installer on it's own, as I didn't have to choose it during or after the process and it was already installed when I first went looking for it. Also, there is a BackupPC.conf file in /etc/httpd/conf.d already, and Apache's httpd.conf still has the entry to "Include" that folder for loading config files.

    I'll try removing BackupPC and installing it again, though I think I've tried this already.

  10. #10
    Join Date
    Apr 2005
    Posts
    38
    Quote Originally Posted by oneofmany
    personally i use cron, cpio and tar
    Heh, yeah there is always that!

    Thing is some of this may be moot until I get something more reliable for hard drives in this server. I'm getting some bad sectors on several of my drives now (some of them are pretty old, like the 30 GB boot drive), and I made the unfortunate decision of using XFS for all my filesystems this time around, which I only recently found out doesn't support marking off bad sectors!

    I need to get a couple more big drives to put ALL my data on so I can wipe these current drives and run the utils on them for fixing the bad sectors. Right now it's stable and I'd like to get BackupPC (or some kind of backup process) working so I don't loose too much more of my data.

  11. #11
    Join Date
    Apr 2005
    Posts
    38
    Quote Originally Posted by DWolfman
    I'll try removing BackupPC and installing it again, though I think I've tried this already.
    OK, here's what happened:

    Uninstalled BackupPC, no problems.
    Installed it, apparently no problems.
    Tried going to http://localhost/backuppc, still no joy.
    Remembering that Linux can be case-sensitive for almost everything it does, I tried http://localhost/BackupPC. That at least gives me a login prompt!
    However, it doesn't matter what user I try to log in as, it just goes back to the login prompt again.

    I even tried changing the backuppc user's main password (and then creating an htpasswd file in /etc/BackupPC) but that didn't work either.

    So, now what?

  12. #12
    Join Date
    Jun 2005
    Posts
    47
    Check the BackupPC.conf file in /etc/httpd/conf.d...that'll tell you which htaccess file it's looking for. Mine is using one in /etc/BackupPC/apache.users

  13. #13
    Join Date
    Apr 2005
    Posts
    38
    Quote Originally Posted by xawen
    Check the BackupPC.conf file in /etc/httpd/conf.d...that'll tell you which htaccess file it's looking for. Mine is using one in /etc/BackupPC/apache.users
    That was it. Once I got that set up with htpasswd, then I was able to log in.

    However, I've now given up on BackupPC. After that I found out that none of the backup methods would work, since it required even more configuration of other programs (like SSH for example) before anything would work.

    Managed to get something going with tar, so I'll just use that for now. Would rather not waste so much drive space though, which BackupPC would have taken care of. Maybe a future Fedora package will actually have everything set up so it will work without having to reconfigure everything under the sun to make it work? And maybe there will be a real Fedora howto by then as well.

    Thanks for the help though. I couldn't find anything about this anywhere I searched for it.

  14. #14
    Join Date
    Jun 2005
    Posts
    179
    I'm updating this post from 2005 to 2010

    Intro
    ---------
    BackupPC is far and away the best backups system I've ever used.
    I have an enormous data farm here that seems to grow endlessly on
    my home LAN. We're talking about machines with 2-3 TB on them
    and a GB network. I use a tiny Atom (dual core) Intel box to run the
    backups and the target drive is a 1.5 TB USB 2.0 drive. It works
    very well. BackupPC documentation is now EXCELLENT but the length
    (about 75 pages) can be daunting. Fortunately you only really need
    to read about 3 pages to get it working!

    Install BackupPC and Apache on your server machine from a root terminal
    or using yumex or however you prefer.
    ------------------------------------------------------------------------------------------------
    # yum install Apache
    # yum install BackupPC

    Yum will create the backuppc user for you and the associated folders
    /etc/BackupPC and /var/lib/BackupPC with unconfigured files.

    /var/lib/BackupPC will contain default pc and cpool folders.
    /etc/BackupPC will contain config.pl and hosts which we will be
    working with.


    Prepare the target storage
    ----------------------------------
    To get your backup system running, find a large drive or partition
    that will be your target. If you use a USB drive when you plug it
    in you will see a resource ID number in /media. I don't like using
    these so I usually make a symbolic link to it with the following
    keystroks:

    # ln -s 1def<tab> 1P5TBUSB <enter>

    The 1def is the first 4 chars of the resource ID, tab lets Linux
    add the rest for me, and 1P5TBUSB is the name of the symbolic
    link to that drive. Now I can refer to that drive easily and sometimes
    even remember its name!

    On 1P5TBUSB I then create pc and cpool folders and set the
    owner to the backuppc user, like this:

    # mkdir /media/1P5TBUSB/pc
    # mkdir /media/1P5TBUSB/cpool
    # chown -R backuppc:backuppc 1P5TBUSB/*

    (Of course you must have your drive formatted, and since most
    USB drives come set up for NTFS and Windows I usually format
    them with ext3 first using gparted or qtparted)

    You now have a target drive for BackupPC to work with and its
    ready to go. It can be reached easily by referring to the symbolic
    referrence /media/1P5TBUSB


    Now setup automatic root login for each client
    -----------------------------------------------------------
    First, understand this. Your BackupPC server must be able to log
    into each machine as root using keys instead of passwords. This
    means the keys must be installed and working in the root account
    for each machine. Since it knows that root is root, it does not need
    an account on your client systems.

    1. You do not need to run rsyncd on your client machines.

    2. You MUST NOT have root logins prohibited in your SSH config
    file on your clients, since BackupPC needs to log into each client as root.

    3. The name or reference for each machine must work so if
    you have any local DNS errors they are going to need to
    be fixed. I have had luck using IP references for machine
    names though and BackupPC has a mechanism for using
    DHCP searches which is well documented.


    4. Run system-config-services from the command line which
    will bring up the GUI for services or System/Administration/Services
    using your mouse. Enable and start httpd (this is Apache, its
    the "http daemon") and backuppc.

    5. Now you must prepare the no password login as root for
    each client.

    a. From your account at the $ prompt do the following:

    $ su -
    [enter the root password when asked]

    # ssh-keygen -t rsa
    [hit return to accept the default location for the keys and their password]

    #scp .ssh/id_rsa.pub <yourusername>@<yourbackuppcservername>:~/Desktop/<clientreference>.pub
    [supply the password when it asks]
    [example: scp .ssh/id_rsa.pub umina@server.startrek.lan:~/Desktop/workstation1.pub <enter>]

    You have now generated a key for root login on your client machine and copied it to the desktop
    of your backup server using a name which helps to identify where the key is used. Repeat this
    for each client.

    b. Now you must put all of those public keys into the backuppc user area so backuppc can use
    them to log in to each client. Since backuppc is not a regular user (it has no home folder and no
    login shell specified, you just cant log in as backuppc.

    On your backuppc server, log in and then switch to root and then log in to backuppc as follows:

    $su -
    [enter root password when asked]
    # su -s /bin/bash backuppc
    Bash 4.0 $

    You are now logged into your backuppc account with a shell.

    Change to the folder that backuppc operates from:

    $cd /var/lib/BackupPC
    $mkdir .ssh

    Leave this window open and start another terminal session.
    Log into that terminal as root (su - as above)

    In your new root terminal window move your key files from your
    personal account desktop to the new .ssh folder in the backuppc
    user area.

    mv /home/<youraccount>/Desktop/Workstation1.pub /var/lib/BackupPC/.ssh/authorized_keys
    cat /home/<youraccount>/Desktop/Workstation2.pub>>/var/lib/BackupPC/.ssh/authorized_keys
    (repeat for workstation3 to N as required)

    chown -R backuppc:backuppc /var/lib/BackupPC/.ssh
    chmod -R 700 /var/lib/BackupPC/.ssh

    At this point you should have a single file, owned by backuppc in the folder /var/lib/BackupPC/.ssh
    that is named authorized_keys that contains a key for each workstation. You can look at this file
    using # gedit /var/lib/BackupPC/.ssh/authorized_keys but do not edit it

    Now switch back to your terminal session where you are logged in as backuppc. This is
    an important final step.

    From that terminal attempt to log in to each workstation. You will be prompted for each
    to add it to known hosts. Answer "yes". For example:

    Bash 4.0 $ ssh root@workstation1.startrek.lan
    [when asked about adding it to known hosts answer yes]
    At that point you should find yourself logged into workstation1 as root without the password
    because you have the secret key!

    exit from workstation1 and try it again. This time you will not get the prompt for adding
    it to Known Hosts because its already "known".

    When you can do this for each workstation from the backuppc account, BackupPC can
    too, and this is how it all happens.

    Now you need to modify config.pl to tell it where your storage is located.
    I do this with the joe editor because it runs in the terminal window and is
    somewhat intuitive. (from your root terminal you can type #yum install joe to get it.

    Bash 4.0$ cd /etc/BackupPC
    Bash 4.0$ joe config.pl

    The editor now fills the terminal window with the contents of config.pl

    With your down arrow key, scroll down to the area that looks like this:

    # CgiDir - Apache CGI directory for BackupPC_Admin
    #
    $Conf{TopDir} = '/media/1P5TBDisk/';
    $Conf{ConfDir} = '/etc/BackupPC/';
    $Conf{LogDir} = '/var/log/BackupPC';
    $Conf{InstallDir} = '/usr/share/BackupPC';
    $Conf{CgiDir} = '/usr/share/BackupPC/sbin/';

    Edit the line for $Conf{TopDir} to indicate your drive. As you can see
    mine is set for /media/1P5TBDisk. Make sure you leave in the single
    quotes and the semicolon.

    Enter Cntrl-K,x (Cntrl-K is the command prefix, x means save and exit. Do not type the comma!)

    Now you must tell BackupPC what hosts its supposed to work with. This is done by
    editing the file /etc/BackupPC/hosts

    Bash 4.0 $ joe hosts

    move to the end of the file and add your workstation and the account name to
    which mail will be sent and from which you will allow status access (otherwise
    it will be allowed only for root)

    For example:

    workstation1.startrek.lan 0 umina
    workstation2.startrek.lan 0 umina
    10.10.10.32 0 umina

    Cntrl-K,x

    You are now basically done. Exit from your backuppc window:

    $ Bash 4.0 $exit<enter>

    Go to your root terminal window and type:
    # /etc/init.d/backuppc reload
    # exit

    Open your browser and enter http://localhost/BackupPC
    You should see host names for each of the machines you entered
    in the hosts file. Select each one, schedule a full backup and have
    some coffee.

    Just FYI, as I write this I'm doing it on my little atom machine using
    Seamonkey while the system is doing full backups on 3 other
    machines. The atom is running FC12 and running at 100% CPU,
    load of 4.9 and network at 2.6 MB/sec

    The point is BackupPC is very well behaved and a leading edge
    work of art.
    Last edited by wt6g; 25th February 2010 at 05:44 PM. Reason: update
    Len Umina
    El Dorado Hills, CA
    WT6G

  15. #15
    Join Date
    Aug 2009
    Posts
    2
    Ok, I start it in services but I have to go through this to get it working!!!?
    Isn't there an entry in the start menu?

    This is why I hate linux.

    -benton

Page 1 of 2 1 2 LastLast

Similar Threads

  1. fc9, backupPC and httpd
    By alpinekid in forum Using Fedora
    Replies: 0
    Last Post: 6th September 2008, 05:10 AM
  2. BackupPC from yum - fedora core 7
    By sergio_101 in forum Using Fedora
    Replies: 0
    Last Post: 14th September 2007, 03:48 PM
  3. Running BackupPC
    By fryemo in forum Using Fedora
    Replies: 2
    Last Post: 25th August 2007, 01:41 PM
  4. FC6 BackupPC
    By blckspder in forum Using Fedora
    Replies: 3
    Last Post: 5th June 2007, 05:52 PM
  5. Backuppc Server
    By adad in forum Using Fedora
    Replies: 7
    Last Post: 23rd August 2005, 03:25 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •