BackupPC-users

Re: [BackupPC-users] Basic setup issues (Ubuntu 12.10)

2013-01-04 10:10:34
Subject: Re: [BackupPC-users] Basic setup issues (Ubuntu 12.10)
From: Travis Schwenke <travis.schwenke AT gmail DOT com>
To: "Tyler J. Wagner" <tyler AT tolaris DOT com>
Date: Fri, 4 Jan 2013 10:08:52 -0500

> Are you talking about the "backuppc" system user, which owns the data files
> and SSH keys, and runs some programs like rsync? Or are you talking about
> the HTTPauth user? Your example commands seem to indicate that you
> understand there are two.

Well, I figured there were two but wasn't 100% sure.  So the frustrating part would be that I seem to NOT know then the password to the backuppc USER that was created on the system.  After the install it gave me a password and that works for the web page but obviously NOT for the user, since su fails.  I also tried su -s /bin/bash backuppc, but the password seemed wrong. Guess I might need to open a shell as root (or sudo) so that I can force change the password.  Just frustrating that on a clean install I can't even RUN the command all the instructions say to run.  I am not totally used to the sudo thing since I had Mandriva running for years and would su over to the root to fix/update system things.

> Consider also adding a symlink to your new destination:
Not sure what benefit this has if I just point to a new spot??  The /data01 is a 800Gb partition on a separate drive, the other 200Gb is mounted as /www or /ftp (don't remember how I did that 2 weeks ago!).  In any case I have /data01, /data02 and /data03 all mounted at the root right now which are all individual drives.  (/data02 is the main one I need to backup on this system, has all our music etc!)

> 2. Test your SSH key authentication carefully. Consider giving the backuppc
> user a shell (see "sudo chsh backuppc"), temporarily, so you can login and
> test. I give it one permanently, although that could be regarded as a
> security risk.
Ok, I have to do all this (maybe, might stick with tar).  My first thing was to get the BackupPC running and backing up the windows boxes in the house using smb (to the RIGHT SPOT).  I noticed that Ubuntu 12.10 desktop doesn't have ssh and a couple other things installed that are needed. So I have to install them and setup that all up before I can rsync files from "localhost".  Really my environment is this ONE linux box (this one) and 4 windows boxes.

> 3. Your BackupPC filesystem must support hardlinks. It sounds like you've
> done this before, but /data01 in your case must be ext2/3/4, xfs, or some
> other filesystem that supports hard links. There's plenty of discussion on
> this but I'm quite happy with ext4 and its default options.
Yeah, everything is ext3 or ext4 (actually data02 is the only one ext3 and that is since it came straight out of my old "server" that died and was ext3 already)

On Fri, Jan 4, 2013 at 9:27 AM, Tyler J. Wagner <tyler AT tolaris DOT com> wrote:
On 2013-01-04 12:40, Travis Schwenke wrote:
>   * Ok.. I can't even change backuppc password!  I figured I would su over
>     to backuppc but that doesn't even work.  *How do I change the password
>     on Ubuntu?*

Are you talking about the "backuppc" system user, which owns the data files
and SSH keys, and runs some programs like rsync? Or are you talking about
the HTTPauth user? Your example commands seem to indicate that you
understand there are two.

However, your example commands also run as "travis@TAS-Server", not root.
Consider using sudo, as travis can't edit most of these files.

>   * Ubuntu seems to install (without a prompt) the data directory at
>     /var/lib/backuppc (owner: backuppc / group: backuppc).  *I really want
>     to change this* as that is NOT where I reserved space.

Change $Conf{TopDir} in /etc/backuppc/config.pl and restart BackupPC.
Consider also adding a symlink to your new destination:

sudo mv /var/lib/backuppc/* /data01/
sudo ln -s /data01 /var/lib/backuppc

However, it is easy to remount or bind /data01 to /var/lib/backuppc:

mount -o bind /data01 /var/lib/backuppc

In /etc/fstab:

/data01 /var/lib/backuppc               none    bind    0       0

>       o I did read some of the things I found and it looked like in my
>         version I could just change TopDir (which is NOT in the GUI) but
>         when I tired, I broke the web GUI.  My guess is that I changed the
>         file using root and I then had a permission issue.
>       o This really gets me back to, *how should I be changing these
>         files?*

Editing the file with sudo or root is fine. The permissions won't change.
*Copying* the files will result in the new files being owned by the wrong
user, unless you do "cp -a".

If you change TopDir, you'll have to restart BackupPC.

Some *really* important tips:

1. Give BackupPC its own filesystem. Do not use the filesystem at
/var/lib/backuppc (/data01 for you) for any other purpose. Some months down
the line you'll need to fsck this filesystem while the server is online and
you'll regret it if you didn't separate them. I used a shared /var/
partition until recently and it bit me in the butt repeatedly.

2. Test your SSH key authentication carefully. Consider giving the backuppc
user a shell (see "sudo chsh backuppc"), temporarily, so you can login and
test. I give it one permanently, although that could be regarded as a
security risk.

3. Your BackupPC filesystem must support hardlinks. It sounds like you've
done this before, but /data01 in your case must be ext2/3/4, xfs, or some
other filesystem that supports hard links. There's plenty of discussion on
this but I'm quite happy with ext4 and its default options.

Regards,
Tyler

--
"Those who make peaceful revolution impossible will make violent
revolution inevitable."
   -- John F. Kennedy

------------------------------------------------------------------------------
Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and
much more. Get web development skills now with LearnDevNow -
350+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122812
_______________________________________________
BackupPC-users mailing list
BackupPC-users AT lists.sourceforge DOT net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/