[BackupPC-users] Copied config with old hostname and backing up myself by mistake

2021-04-12 Thread Gavin Henry
Hi all,

We're using BackupPC in two datacenters backing up local VMs and bare
metal servers and things in the opposite DC.

I've spotted a weird thing where one DC server is supposed to be
backing up a host in the other DC, but it actually turns out to be
backing up itself because we messed up copying the BackupPC config.
For example:

* BackupPC node 1 is gavin.suretec.net in DC1
* BackupPC node 2 is henry.suretec.net in DC2

Now gavin.suretec.net BackupPC server config was copied to the new
server in the other DC onto henry.suretec.net

henry.suretec.net server config in BackupPC says the host is
gavin.suretec.net and the server URL is gavin.suretec.net when it
should be henry.suretec.net really.

DNS is correct in that gavin.suretec.net is in DC1, but even after
changing all the BackupPC server details to henry.suretec.net, it's
still treating henry.suretec.net as the other host
(gavin.suretec.net), i.e. it's not connecting to gavin.suretec.net to
rsync data back. It's just rsyncing to itself.

I just can't figure out why it still thinks it's the other BackupPC
node. There are some local database dumps done to that server I want
to pull down to the other BackupPC node via normal backup jobs run via
BackupPC. I'm not trying to backup BackupPC data, just a folder. I
originally checked the folder that was rsyncing in case rsync saw an
underlying mounted filesystem or something, but it's not that. I've
restarted backuppc too.

Make sense? What else can I check? I've ssh'd to the other node as the
correct user and it connects as I'd expect.

-- 
Kind Regards,
Gavin Henry.


___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:https://github.com/backuppc/backuppc/wiki
Project: https://backuppc.github.io/backuppc/


Re: [BackupPC-users] Copied config with old hostname and backing up myself by mistake

2021-04-14 Thread Gavin Henry
Hi all,

Any pointers would be greatly appreciated.

Does the project or anyone subscribers offer paid support?

We're also looking for help to migrate to v4.

Thanks,
Gavin.
___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:https://github.com/backuppc/backuppc/wiki
Project: https://backuppc.github.io/backuppc/


Re: [BackupPC-users] Copied config with old hostname and backing up myself by mistake

2021-04-15 Thread Gavin Henry
> > DNS is correct in that gavin.suretec.net is in DC1, but even after
> > changing all the BackupPC server details to henry.suretec.net, it's
> > still treating henry.suretec.net as the other host
> > (gavin.suretec.net), i.e. it's not connecting to gavin.suretec.net to
> > rsync data back. It's just rsyncing to itself.
>
> If you have anything in $Conf{ClientNameAlias} it would override the
> host name.  Also an entry in the server's /etc/hosts file could
> override DNS when connecting.  If it is a windows target using netbios
> names it would be the client's own idea of its name that matters.

Hi Les,

Yep, checked the alias. That's empty. /etc/hosts I checked first.
nmblookup -A returns correct IP address.

Sooo strange.


___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:https://github.com/backuppc/backuppc/wiki
Project: https://backuppc.github.io/backuppc/


Re: [BackupPC-users] Copied config with old hostname and backing up myself by mistake

2021-04-20 Thread Gavin Henry
Hi all,

Just a follow up after I engaged my brain. So because this config was
copied from a backuppc server in another data centre and that server
has now become "remote", i.e. not the local box, the RsyncClientCmd
didn't have any SSH in it

So it was:

RsyncClientCmd: /usr/bin/sudo $rsyncPath $argList+
RsyncClientRestoreCmd: /usr/bin/sudo $rsyncPath $argList+

when it should have been:

RsyncClientCmd: $sshPath -q -x -p X -l root $host nice -n 19
/usr/bin/ionice -c 2 $rsyncPath $argList+
RsyncClientRestoreCmd: $sshPath -q -x -p X -l root $host nice
-n 19 /usr/bin/ionice -c 2 $rsyncPath $argList+

In case others do what I did :-)

Thanks.


___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:https://github.com/backuppc/backuppc/wiki
Project: https://backuppc.github.io/backuppc/


[BackupPC-users] Rsync and swapping the hard drive mounted at /var/lib/BackupPC - backups vanish

2021-07-24 Thread Gavin Henry
Hi all,

On my home desktop my backups are going to a 2TB usb drive. All good. It's
filling up, so I bought a 4TB usb one and have rsynced all data on the same
type of filesystem too (rsync -av --delete) but when I mount it and restart
BackupPC, nothing shows. Put the old drive back and re-mount/restart and
they are all there.

What have I missed here?

Thanks,
Gavin.
___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:https://github.com/backuppc/backuppc/wiki
Project: https://backuppc.github.io/backuppc/


Re: [BackupPC-users] Rsync and swapping the hard drive mounted at /var/lib/BackupPC - backups vanish

2021-07-24 Thread Gavin Henry
> How are you mounting it? Unit file? /etc/fstab?

/etc/fstab (just the usb devices have changed)

/dev/sdd1 /var/lib/BackupPC   ext4defaults0 0
#/dev/sde1 /var/lib/BackupPC   ext4defaults0 0


> Permissions look ok on the drive and the mount point? How about selinux?

I'm being thick here:

New USB drive:
sudo mount /var/lib/BackupPC/
ls -lhd /var/lib/BackupPC
drwx-- 5 ghenry ghenry 4.0K Jul 24 19:26 /var/lib/BackupPC

sudo umount /var/lib/BackupPC/
ls -lhd /var/lib/BackupPC
drwxr-xr-x 2 root root 4.0K Aug 15  2016 /var/lib/BackupPC

sudo mount /var/lib/BackupPC/
ls -lhd /var/lib/BackupPC
drwxr-x---. 7 backuppc root 4.0K Jan 25 22:23 /var/lib/BackupPC

Remind me, where is it inheriting the perms from? The folders under
the mount are all correct.

I'll check .

> I generally label my partitions on my removable drives and use
> /dev/disk/by-label in a mount script to mount drives I expect to swap
> often. (I haven't done that with BackupPC but I do it with another
> situation.)

OK. I'm not swapping them often, but will have a think about that :-)

> My unit files:

[Unit]
Description= BackupPC server
After=syslog.target local-fs.target remote-fs.target

[Service]
Type=simple
User=backuppc
Group=backuppc
ExecStart=/usr/share/BackupPC/bin/BackupPC
ExecReload=/bin/kill -HUP $MAINPID
PIDFile=/run/BackupPC/BackupPC.pid

[Install]
WantedBy=multi-user.target


___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:https://github.com/backuppc/backuppc/wiki
Project: https://backuppc.github.io/backuppc/


Re: [BackupPC-users] Rsync and swapping the hard drive mounted at /var/lib/BackupPC - backups vanish

2021-07-24 Thread Gavin Henry
Sorted. Permissions as always. Thanks for your second pair of eyes Kenneth!

I'm re-running the rsync like so for selinux too (due to the dot at
the end of the directory perms):

rsync -av -X --delete --dry-run backuppc/ /var/lib/BackupPC/

ls -lhd /var/lib/BackupPC
drwxr-x---. 7 backuppc root 4.0K Jan 25 22:23 /var/lib/BackupPC


___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:https://github.com/backuppc/backuppc/wiki
Project: https://backuppc.github.io/backuppc/


Re: [BackupPC-users] Rsync and swapping the hard drive mounted at /var/lib/BackupPC - backups vanish

2021-07-24 Thread Gavin Henry
That's fixed it and all matches up now:

sudo ls -lhd /var/lib/BackupPC/
drwxr-x---. 7 backuppc root 4.0K Jan 25 22:23 /var/lib/BackupPC/


___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:https://github.com/backuppc/backuppc/wiki
Project: https://backuppc.github.io/backuppc/


Re: [BackupPC-users] Rsync and swapping the hard drive mounted at /var/lib/BackupPC - backups vanish

2021-07-24 Thread Gavin Henry
On Sat, 24 Jul 2021, 21:52 Kenneth Porter,  wrote:

> On 7/24/2021 1:34 PM, Gavin Henry wrote:
> > Remind me, where is it inheriting the perms from? The folders under
> > the mount are all correct.
>
> ext4 stores owner and group id numbers, so you need to do a "chown -R
> backuppc.backuppc /var/lib/BackupPC" when it's mounted to set the uid
> and gid. Alas, it looks like the UID and GID for backuppc aren't
> registered so they get dynamically allocated when the package is
> installed. They'll be different on every system. So one might need to do
> the chown as part of a startup script if the drive gets shared among
> several servers.
>

Rsync took care of all that for me :)



> Tip:
>
> Mount the drive's root to /mnt/BackupPC, create subfolders /backuppc/etc
> and /backuppc/BackupPC, then do a bind mount of those folders to
> /etc/BackupPC and /var/lib/BackupPC. That way you'll keep the
> configuration on the drive with the data. It makes a bare-metal recovery
> easier if the server dies.
>

That's a good point! Thanks.



>
> ___
> BackupPC-users mailing list
> BackupPC-users@lists.sourceforge.net
> List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
> Wiki:https://github.com/backuppc/backuppc/wiki
> Project: https://backuppc.github.io/backuppc/
>
___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:https://github.com/backuppc/backuppc/wiki
Project: https://backuppc.github.io/backuppc/


Re: [BackupPC-users] Rsync and swapping the hard drive mounted at /var/lib/BackupPC - backups vanish

2021-07-25 Thread Gavin Henry
>
>
>
> Hopefully, you have backuppc v4, which does not have the hard link
> limitation issue so that you can just do a regular rsync.
>

Yeah, v4 at home in Fedora 32, but v3 in two datacentres (Edinburgh and
London) backing up 102~ nodes at SureVoIP (my business). Each sites big
BackupPC box does both sites with rsync very well.

I know LINX use this two that's why we did.

Very, very good!

>
___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:https://github.com/backuppc/backuppc/wiki
Project: https://backuppc.github.io/backuppc/