[BackupPC-users] Cant Backup Mount Point
Hi, i use BPC 4.4.0 with rsync for a linux machine. I mounted via fstab a second sdc1 drive at /var/files/, but this folder isnt backuped. I see in the backup foldertree /var/files but its empty. I have no exclusion for /var/files, or /var/. I assume there is a build in setting for non root disks, but i cant find a solution. Has anybody an idea? thx Taste ___ 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] ssh+rsync and known_hosts
On 7/23/2023 11:42 AM, backu...@kosowsky.org wrote: While allowing root permissions to rsync is a pretty big security hole itself, it is a little less drastic than simply logging in as root. On my more sensitive machines, I run rsyncd in read-only mode with exclusions. I do wish rsyncd offered an only-one-filesystem feature so I don't have to remember all the mount points to exclude. ___ 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] ssh+rsync and known_hosts
Paul Fox wrote at about 12:46:18 -0400 on Saturday, July 22, 2023: > Kenneth Porter wrote: > > I'm setting up some Raspberry Pis and I set up BackupPC to back them up > > using ssh+rsync. I installed the key in ~backuppc/.ssh/authorized_keys > but > > the initial backup was still failing. > > Unless things have changed (and they might have, but I still do it > this way), then the public key needs to go into /root/.ssh/authorized_keys. > Backuppc (on your backuppc server) needs root access to the client in > order to be able to read all of the files it needs. (You could use a > different user id on the client if you're sure that user can read all > the files which need to be backed up.) On my Linux machines (including RPis), I prefer to create a seaparate backuppc client account and then give it the necessary restricted privileges using sudo. For example, I add this to my etc/sudoers file on each relevant Linux client: #BackupPC #Don't require tty for user 'backuppcClient' Defaults:backuppcClient !requiretty #Allow user 'backuppcClient' to run sudo rsync to avoid need for ssh root@localhost: #Note for rsync < 3.1.x, string to sender can be either: -slHogDtpAXrcxe.iLsf (full) or -slHogDtpAXrxe.iLsf (incremental) #backuppcClient ALL=NOPASSWD: /usr/bin/rsync --server --sender -slHogDtpAXrxe.iLsf, /usr/bin/rsync --server --sender -slHogDtpAXrcxe.iLsf #Note for rsync >= 4.x, string to sender can be either: -slHogDtpAXrcxe.iLsfxC (full) or -slHogDtpAXrxe.iLsfxC (incremental) backuppcClient ALL=NOPASSWD: /usr/bin/rsync --server --sender -slHogDtpAXrxe.iLsfxC, /usr/bin/rsync --server --sender -slHogDtpAXrcxe.iLsfxC While allowing root permissions to rsync is a pretty big security hole itself, it is a little less drastic than simply logging in as root. > > > So I tried manually ssh'ing into the > > Pi and discovered I was hitting the question to add the Pi to > known_hosts. > > I don't see this mentioned in the documentation. I'm not sure where it > > would even go, but I wanted to mention it as I'll likely forget this a > year > > from now. > > You should be trying to manually ssh from the backuppc account, and > you should be trying to become root on the client. I usually do this: > > sudo su - backuppc # take on the identity of backuppc > ssh root@clientmachine # log in to the client as root > id # verify identity on client > exit# leave the client > exit# resume your normal identity > If you use my approach, then you would: ssh backuppcClient@clientmachine > When you hit that "add to known hosts?" question from ssh, just answer > "yes". ssh will put the key in the right place (which is in > ~backuppc/ssh/known_hosts). Don't forget to exit out of both the ssh > and the "sudo su" after you've tested. > > paul > =-- > paul fox, p...@foxharp.boston.ma.us (arlington, ma, where it's 73.1 degrees) > > > > ___ > 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] ssh+rsync and known_hosts
--On Saturday, July 22, 2023 1:46 PM -0400 Paul Fox wrote: You should be trying to manually ssh from the backuppc account You'd think, but that's the last thing I tried, not the first. I was trying to diagnose the problem by running BackupPC_dump (as user backuppc) and trying to debug from the resulting output. But the only clue there was the refused handshake. I thought the key was wrong, when it was the missing entry in known_hosts that was the problem. With this exchange, perhaps the next person who runs into this will find the solution in the Google results. ___ 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] A Perl error?
Hi, I don't usually wade in to discussions like these, but as I understand perl fairly well, I feel the need to point out that you are on the wrong track G.W.Haywood.The error message does not refer to line 742 of config.pl, but to that of configure.pl, presumably the script which reads config.pl.Unless Jan has modified configure.pl, the actual error is still likely to be in config.pl.Jan please give more information - you said 'I started to notice following error.' - following what?Did you make a configuration change just before you noticed the error?Have you had BPC working, or are you still tuning the configuration?Are you using the web interface to do the configuration, or are you editing config.pl by hand?Which version of BPC are you using?Without further information, it's unlikely that other people are going to be able to help you. Kind regards,Peter Major On Sun, 2023-07-23 at 13:59 +0100, G.W. Haywood via BackupPC-users wrote: > Hi there, > On Sun, 23 Jul 2023, Jan Stransky wrote: > > I started to notice following errorCan't use string ("1") as a > > HASH ref while "strict refs" in use at configure.pl line 742 > > Looks like you broke it. > Please let us see what you have around line 742 of configure.pl. > In the vanilla configure.pl that would be somewhere around the > partwhich sets up things to be backed up and/or ignored, but if > yourversion of config.pl has been heavily modified it could be > anything.This is from a current config.pl here: > 8<--- > ---$ cat -n /etc/BackupPC/config.pl | head -n 770 | tail -n > 45726 # Examples:727 #$Conf{BackupFilesExclude} = > '/temp';728 #$Conf{BackupFilesExclude} = ['/temp']; # > same as first example729 #$Conf{BackupFilesExclude} = > ['/temp', '/winnt/tmp'];730 #$Conf{BackupFilesExclude} = > {731 # 'c' => ['/temp', '/winnt/tmp'], # these are > for 'c' share732 # 'd' => ['/junk', '/dont_back_this_up'], > # these are for 'd' > share733 #};734 #$Conf{BackupFilesExclude} = > {735 # 'c' => ['/temp', '/winnt/tmp'], # these are > for 'c' share736 # '*' => ['/junk', '/dont_back_this_up'], > # these are for other > shares737 #};738 #739 $Conf{BackupFilesExclude} = > undef;740741 #742 # PCs that are always or often on the > network can be backed up after743 # hours, to reduce PC, network > and server load during working hours. For744 # each PC a count > of consecutive good pings is maintained. Once a PC has745 # at > least $Conf{BlackoutGoodCnt} consecutive good pings it is > subject746 # to "blackout" and not backed up during hours and > days specified by747 # > $Conf{BlackoutPeriods}.748 #749 # To allow for periodic > rebooting of a PC or other brief periods when a750 # PC is not > on the network, a number of consecutive bad pings is > allowed751 # before the good ping count is reset. This parameter > is752 # $Conf{BlackoutBadPingLimit}.753 #754 # Note > that bad and good pings don't occur with the same interval. If > a755 # machine is always on the network, it will only be pinged > roughly once756 # every $Conf{IncrPeriod} (eg: once per day). So > a setting for757 # $Conf{BlackoutGoodCnt} of 7 means it will > take around 7 days for a758 # machine to be subject to blackout. > On the other hand, if a ping is759 # failed, it will be retried > roughly every time BackupPC wakes up, eg,760 # every one or two > hours. So a setting for $Conf{BlackoutBadPingLimit} of761 # 3 > means that the PC will lose its blackout status after 3-6 hours > of762 # unavailability.763 #764 # To disable the > blackout feature set $Conf{BlackoutGoodCnt} to a negative765 # > value. A value of 0 will make all machines subject to > blackout. But766 # if you don't want to do any backups during > the day it would be easier767 # to just set > $Conf{WakeupSchedule} to a restricted > schedule.768 #769 $Conf{BlackoutBadPingLimit} = > 3;770 $Conf{BlackoutGoodCnt} = 7;8<-- > ___ 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] A Perl error?
Hi there, On Sun, 23 Jul 2023, Jan Stransky wrote: I started to notice following error. Does any one have any ideas? It seems to be more related to configure.pl genrerator, rather than the actual configuration. Cheers, Jan Can't use string ("1") as a HASH ref while "strict refs" in use at configure.pl line 742. Let's try that again :) What version of BackupPC are you using, and was it installed from a package or did you install it manually for example from some tarball? If the latter, please tell us what it was and where it came from. -- 73, Ged. ___ 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] A Perl error?
Hi there, On Sun, 23 Jul 2023, Peter Major wrote: I don't usually wade in to discussions like these, but as I understand perl fairly well, I feel the need to point out that you are on the wrong track G.W.Haywood.The error message does not refer to line 742 of config.pl, but to that of configure.pl, presumably the script which reads config.pl. Ah, yes, you're quite right. Apologies for my inexcusable carelessness. -- 73, Ged. ___ 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] A Perl error?
Hi there, On Sun, 23 Jul 2023, Jan Stransky wrote: I started to notice following error. ... Can't use string ("1") as a HASH ref while "strict refs" in use at configure.pl line 742. ... Looks like you broke it. Please let us see what you have around line 742 of configure.pl. In the vanilla configure.pl that would be somewhere around the part which sets up things to be backed up and/or ignored, but if your version of config.pl has been heavily modified it could be anything. This is from a current config.pl here: 8<-- $ cat -n /etc/BackupPC/config.pl | head -n 770 | tail -n 45 726 # Examples: 727 #$Conf{BackupFilesExclude} = '/temp'; 728 #$Conf{BackupFilesExclude} = ['/temp']; # same as first example 729 #$Conf{BackupFilesExclude} = ['/temp', '/winnt/tmp']; 730 #$Conf{BackupFilesExclude} = { 731 # 'c' => ['/temp', '/winnt/tmp'], # these are for 'c' share 732 # 'd' => ['/junk', '/dont_back_this_up'], # these are for 'd' share 733 #}; 734 #$Conf{BackupFilesExclude} = { 735 # 'c' => ['/temp', '/winnt/tmp'], # these are for 'c' share 736 # '*' => ['/junk', '/dont_back_this_up'], # these are for other shares 737 #}; 738 # 739 $Conf{BackupFilesExclude} = undef; 740 741 # 742 # PCs that are always or often on the network can be backed up after 743 # hours, to reduce PC, network and server load during working hours. For 744 # each PC a count of consecutive good pings is maintained. Once a PC has 745 # at least $Conf{BlackoutGoodCnt} consecutive good pings it is subject 746 # to "blackout" and not backed up during hours and days specified by 747 # $Conf{BlackoutPeriods}. 748 # 749 # To allow for periodic rebooting of a PC or other brief periods when a 750 # PC is not on the network, a number of consecutive bad pings is allowed 751 # before the good ping count is reset. This parameter is 752 # $Conf{BlackoutBadPingLimit}. 753 # 754 # Note that bad and good pings don't occur with the same interval. If a 755 # machine is always on the network, it will only be pinged roughly once 756 # every $Conf{IncrPeriod} (eg: once per day). So a setting for 757 # $Conf{BlackoutGoodCnt} of 7 means it will take around 7 days for a 758 # machine to be subject to blackout. On the other hand, if a ping is 759 # failed, it will be retried roughly every time BackupPC wakes up, eg, 760 # every one or two hours. So a setting for $Conf{BlackoutBadPingLimit} of 761 # 3 means that the PC will lose its blackout status after 3-6 hours of 762 # unavailability. 763 # 764 # To disable the blackout feature set $Conf{BlackoutGoodCnt} to a negative 765 # value. A value of 0 will make all machines subject to blackout. But 766 # if you don't want to do any backups during the day it would be easier 767 # to just set $Conf{WakeupSchedule} to a restricted schedule. 768 # 769 $Conf{BlackoutBadPingLimit} = 3; 770 $Conf{BlackoutGoodCnt} = 7; 8<-- -- 73, Ged. ___ 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/