Re: [BackupPC-users] BackupPC-4.0.0alpha3 - Can't create a test hardlink between a file...

2015-02-25 Thread Holger Parplies
Hi,

for the sake of completeness (though Adam has already made the point: it helps
to understand what you are asked to do rather than blindly doing it - people
make mistakes when giving advice, as the OP has proven ;-):

Akibu Flash wrote on 2015-02-19 13:32:14 -0800 [Re: [BackupPC-users] 
BackupPC-4.0.0alpha3 - Can't create a test hardlink between a file...]:
 [...]
 Once I fixed the permissions issue, the command start stop command would
 work and give me an ok.  

Beware!

*When starting daemons*, the invoking process can only detect errors the
daemon encounters *before* forking into the background. Often enough and not
necessarily in the context of BackupPC, I've seen the ok type success
message only to find out that the daemon had terminated immediately after
forking, sometimes due to the inability to open a log file, meaning there's
absolutely no trace of why the daemon was not running. This can be extremely
annoying to debug.

BackupPC does some tests before forking, but there are several fatal errors
that can happen after forking. In particular, the log file is opened after
forking, and this *can* fail (e.g. permission problems), so BackupPC *can*
potentially silently die after you get the ok.

What this means is: I got 'ok', so it's running makes no sense for daemon
processes. It's I can see it in 'ps', so it's running. Ok only means it
didn't fail for the more obvious reasons, or rather, not for those of the more
obvious reasons that could be tested beforehand :-).

 [...]
 backuppc@linux-pc5:/$ ls -ld /data
 drwxrwx---+ 3 root root 4096 Jan 18 23:00 /data

This is actually interesting. ACLs? SElinux? I'm referring to the + at the
end of drwxrwx---+. It might even be important, assuming your backuppc user
is *not* in the root group!?

More explicitly: these permissions seem strange to me, but I suppose someone
set them up this way (your distribution? your distribution's BackupPC
package?). Without the whole picture (ACLs, effective UID, GID and
supplementary groups of the running BackupPC process) I can't say whether
this will work or not, though if it didn't, BackupPC should fail before you
get the ok message, meaning you wouldn't get the ok message.

I'd normally have expected something like

 drwxr-xr-x 3 root root 4096 Jan 18 23:00 /data

Access to sensitive information below /data can be limited by subdirectory.
I don't see the point in hiding the subdirectories altogether.

 backuppc@linux-pc5:/$ ls -ld /data/BackupPC
 drwxrwx---+ 5 backuppc backuppc 4096 Jan 18 23:00 /data/BackupPC

Except for the +, that is what I'd expect here.

 [...]
 backuppc@linux-pc5:/$ tune2fs -l /dev/mapper/dreux-root
 tune2fs 1.42.12 (29-Aug-2014)
 tune2fs: Permission denied while trying to open /dev/mapper/dreux-root
 Couldn't find valid filesystem superblock.
 
 Is the output what was to be expected?

Yes. This is the understanding what you're doing part again. As non-root
user, you don't have permission to access the device file. The error message
is not Couldn't find ..., it's tune2fs: Permission denied ..., and it's
quite clear :-). Couldn't find ... is tune2fs's explanation why it gave up
as a result of not being allowed to read from the device.

If you want meaningful output, you'll need to run the tune2fs command as
root. And *before* you do, you might as well try

backuppc@linux-pc5:/$ df -T /data/BackupPC

and see if the type of the file system is really one of ext2, ext3, ext4;
otherwise 'tune2fs' is simply the wrong tool. All of that said, I'm not sure
why the OP wanted you to run tune2fs. Perhaps he wanted to see whether it
really is an ext[234] file system :-).

On a side note, if you're serious about running BackupPC, you definitely
*don't* want to have the pool on your root file system. For testing,
evaluation, and perhaps even debugging problems, you might be fine, but for
production use, you are asking for problems. You're apparently using LVM,
so creating an independent logical volume is really easy (presuming you
haven't allocated all of the space to your root FS).

 Or should my merely removing the linked target also remove the linked file?

No, that will never happen.

I hope some of that helps rather than confuses ...

Regards,
Holger

--
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/


Re: [BackupPC-users] BackupPC-4.0.0alpha3 - Can't create a test hardlink between a file...

2015-02-20 Thread Igor Sverkos
Hi,

Akibu Flash wrote:
 What makes me think that the problem has not been solved fully is that when
 I run the first two of your commands, I get no response (as expected) and
 the testgram is created properly. However, your third command does gives me
 an error that I don't understand. Below are the results:

 backuppc@linux-pc5:/data/BackupPC/pc$ touch /data/BackupPC/pc/testgram
 backuppc@linux-pc5:/data/BackupPC/pc$

 backuppc@linux-pc5:/$ ln /data/BackupPC/pc/testgram /data/BackupPC/cpool
 backuppc@linux-pc5:/$

 backuppc@linux-pc5:/$ rm /data/BackupPC/pc/testgram /data/BackupPC/cpool
 rm: cannot remove ‘/data/BackupPC/cpool’: Is a directory

No! It is good that the 3rd command failed. It was actual my fault.

We only wanted to delete the test symlink we created with the first
command. See what the third command is trying to do: It deletes our
test symlink (testgram in your case), but it also tries to delete the
cpool directory. Something we definitely don't want to do. :)


So if it is now working for you like you wrote, everything is fine.

Your initial problem was a permission problem (this is what we are
testing with these commands, they are the same commands the runscript
tries to execute but we will see failures) you already fixed on your
own if it is now working for you.


Regards,
Igor

--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631iu=/4140/ostg.clktrk
___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/


Re: [BackupPC-users] BackupPC-4.0.0alpha3 - Can't create a test hardlink between a file...

2015-02-19 Thread Akibu Flash
Igor,





I meant to reply to the group to let them know that the problem had been
 solved, but your email makes me think that it has not been solved 
fully.  The script runs as user backuppc and apparently user backuppc 
did not have permission to write to the data locations.  Once I fixed 
the permissions issue, the command start stop command would work and 
give me an ok.  





What makes me think that the problem has not been solved fully is that 
when I run the first two of your commands, I get no response (as 
expected) and the testgram is created properly. However, your third 
command does gives me an error that I don't understand.  Below are the 
results:





backuppc@linux-pc5:/data/BackupPC/pc$ touch /data/BackupPC/pc/testgram


backuppc@linux-pc5:/data/BackupPC/pc$ 





backuppc@linux-pc5:/$ ln /data/BackupPC/pc/testgram /data/BackupPC/cpool


backuppc@linux-pc5:/$ 





backuppc@linux-pc5:/$ rm /data/BackupPC/pc/testgram /data/BackupPC/cpool


rm: cannot remove ‘/data/BackupPC/cpool’: Is a directory





backuppc@linux-pc5:/$ ls -ld /data


drwxrwx---+ 3 root root 4096 Jan 18 23:00 /data





backuppc@linux-pc5:/$ ls -ld /data/BackupPC


drwxrwx---+ 5 backuppc backuppc 4096 Jan 18 23:00 /data/BackupPC





backuppc@linux-pc5:/$ df /data/BackupPC


Filesystem 1K-blocksUsed Available Use% Mounted on


/dev/mapper/dreux-root  19092180 3932368  14166944  22% /





backuppc@linux-pc5:/$ tune2fs -l /dev/mapper/dreux-root


tune2fs 1.42.12 (29-Aug-2014)


tune2fs: Permission denied while trying to open /dev/mapper/dreux-root


Couldn't find valid filesystem superblock.





Is the output what was to be expected?  A couple of things are throwing 
me for a loop.  First, on the remove command rm 
/data/BackupPC/pc/testgram /data/BackupPC/cpool, should that really be 
rm /data/BackupPC/pc/testgram /data/BackupPC/cpool/testgram and is 
that the nature of the Is a directory error?  I presume so.  Or should 
my merely removing the linked target also remove the linked file?





Second, the could not find valid filesystem superblock error is unclear.  





Thanks in advance.



 Date: Thu, 19 Feb 2015 17:40:37 +0100
 From: igor.sver...@googlemail.com
 To: backuppc-users@lists.sourceforge.net
 Subject: Re: [BackupPC-users] BackupPC-4.0.0alpha3 - Can't create a test 
 hardlink between a file...
 
 Hi,
 
 regarding the start-stop-daemon issue: Runscripts should always be
 executed as root. Because start-stop-daemon is usually located in
 /sbin you will see this error when executing the runscript as user.
 
 
 Try to execute the following commands as backuppc user:
 
 $ touch /data/BackupPC/pc/test
 $ ln /data/BackupPC/pc/test /data/BackupPC/cpool
 $ rm /data/BackupPC/pc/test /data/BackupPC/cpool
 
 If one of these commands fail, please show us the output from ls -ld
 /data and ls -ld /data/BackupPC.
 
 Also, run df /data/BackupPC and use the value from the Filesystem
 column in tune2fs -l $value (for example tune2fs -l
 /dev/mapper/dreux-roo where /dev/mapper/dreux-roo could be
 different).
 
 
 Regards,
 Igor
 
 --
 Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
 from Actuate! Instantly Supercharge Your Business Reports and Dashboards
 with Interactivity, Sharing, Native Excel Exports, App Integration  more
 Get technology previously reserved for billion-dollar corporations, FREE
 http://pubads.g.doubleclick.net/gampad/clk?id=190641631iu=/4140/ostg.clktrk
 ___
 BackupPC-users mailing list
 BackupPC-users@lists.sourceforge.net
 List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
 Wiki:http://backuppc.wiki.sourceforge.net
 Project: http://backuppc.sourceforge.net/
  --
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631iu=/4140/ostg.clktrk___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/


Re: [BackupPC-users] BackupPC-4.0.0alpha3 - Can't create a test hardlink between a file...

2015-02-19 Thread Adam Goryachev

On 20/02/15 08:32, Akibu Flash wrote:

Igor,

I meant to reply to the group to let them know that the problem had 
been solved, but your email makes me think that it has not been solved 
fully. The script runs as user backuppc and apparently user backuppc 
did not have permission to write to the data locations. Once I fixed 
the permissions issue, the command start stop command would work and 
give me an ok.


What makes me think that the problem has not been solved fully is that 
when I run the first two of your commands, I get no response (as 
expected) and the testgram is created properly. However, your third 
command does gives me an error that I don't understand. Below are the 
results:


backuppc@linux-pc5:/data/BackupPC/pc$ touch /data/BackupPC/pc/testgram
backuppc@linux-pc5:/data/BackupPC/pc$

backuppc@linux-pc5:/$ ln /data/BackupPC/pc/testgram /data/BackupPC/cpool
backuppc@linux-pc5:/$

backuppc@linux-pc5:/$ rm /data/BackupPC/pc/testgram /data/BackupPC/cpool
rm: cannot remove ‘/data/BackupPC/cpool’: Is a directory

Is the output what was to be expected? A couple of things are throwing 
me for a loop. First, on the remove command rm 
/data/BackupPC/pc/testgram /data/BackupPC/cpool, should that really 
be rm /data/BackupPC/pc/testgram /data/BackupPC/cpool/testgram and 
is that the nature of the Is a directory error? I presume so. Or 
should my merely removing the linked target also remove the linked file?


Second, the could not find valid filesystem superblock error is unclear.

Yes, this error is expected based on the commands you were given. It 
would help if you understood the commands you run, as sometimes you will 
be told to run something that could be highly destructive (even if by 
accident).


In this case, you had the command:
backuppc@linux-pc5:/$ rm /data/BackupPC/pc/testgram /data/BackupPC/cpool
rm: cannot remove ‘/data/BackupPC/cpool’: Is a directory

Which says remove the two *files* /data/BackupPC/pc/testgram and 
/data/BackupPC/cpool, but the second is a directory, not a file. So rm 
is complaining that you asked it to remove a file, but it wasn't a file. 
The command should have been:

rm /data/BackupPC/pc/testgram /data/BackupPC/cpool/testgram

Regards,
Adam

--
Adam Goryachev Website Managers www.websitemanagers.com.au
--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631iu=/4140/ostg.clktrk___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/


Re: [BackupPC-users] BackupPC-4.0.0alpha3 - Can't create a test hardlink between a file...

2015-02-19 Thread Igor Sverkos
Hi,

regarding the start-stop-daemon issue: Runscripts should always be
executed as root. Because start-stop-daemon is usually located in
/sbin you will see this error when executing the runscript as user.


Try to execute the following commands as backuppc user:

$ touch /data/BackupPC/pc/test
$ ln /data/BackupPC/pc/test /data/BackupPC/cpool
$ rm /data/BackupPC/pc/test /data/BackupPC/cpool

If one of these commands fail, please show us the output from ls -ld
/data and ls -ld /data/BackupPC.

Also, run df /data/BackupPC and use the value from the Filesystem
column in tune2fs -l $value (for example tune2fs -l
/dev/mapper/dreux-roo where /dev/mapper/dreux-roo could be
different).


Regards,
Igor

--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631iu=/4140/ostg.clktrk
___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/


Re: [BackupPC-users] BackupPC-4.0.0alpha3 - Can't create a test hardlink between a file...

2015-02-19 Thread Akibu Flash

Thanks Adam. It is what I thought.

Sent from my HTC on T-Mobile 4G LTE

- Reply message -
From: Adam Goryachev mailingli...@websitemanagers.com.au
To: backuppc-users@lists.sourceforge.net
Subject: [BackupPC-users] BackupPC-4.0.0alpha3 - Can't create a test hardlink 
between a file...
Date: Thu, Feb 19, 2015 17:37


On 20/02/15 08:32, Akibu Flash wrote:
 Igor,

 I meant to reply to the group to let them know that the problem had
 been solved, but your email makes me think that it has not been solved
 fully. The script runs as user backuppc and apparently user backuppc
 did not have permission to write to the data locations. Once I fixed
 the permissions issue, the command start stop command would work and
 give me an ok.

 What makes me think that the problem has not been solved fully is that
 when I run the first two of your commands, I get no response (as
 expected) and the testgram is created properly. However, your third
 command does gives me an error that I don't understand. Below are the
 results:

 backuppc@linux-pc5:/data/BackupPC/pc$ touch /data/BackupPC/pc/testgram
 backuppc@linux-pc5:/data/BackupPC/pc$

 backuppc@linux-pc5:/$ ln /data/BackupPC/pc/testgram /data/BackupPC/cpool
 backuppc@linux-pc5:/$

 backuppc@linux-pc5:/$ rm /data/BackupPC/pc/testgram /data/BackupPC/cpool
 rm: cannot remove ‘/data/BackupPC/cpool’: Is a directory

 Is the output what was to be expected? A couple of things are throwing
 me for a loop. First, on the remove command rm
 /data/BackupPC/pc/testgram /data/BackupPC/cpool, should that really
 be rm /data/BackupPC/pc/testgram /data/BackupPC/cpool/testgram and
 is that the nature of the Is a directory error? I presume so. Or
 should my merely removing the linked target also remove the linked file?

 Second, the could not find valid filesystem superblock error is unclear.

Yes, this error is expected based on the commands you were given. It
would help if you understood the commands you run, as sometimes you will
be told to run something that could be highly destructive (even if by
accident).

In this case, you had the command:
backuppc@linux-pc5:/$ rm /data/BackupPC/pc/testgram /data/BackupPC/cpool
rm: cannot remove ‘/data/BackupPC/cpool’: Is a directory

Which says remove the two *files* /data/BackupPC/pc/testgram and
/data/BackupPC/cpool, but the second is a directory, not a file. So rm
is complaining that you asked it to remove a file, but it wasn't a file.
The command should have been:
rm /data/BackupPC/pc/testgram /data/BackupPC/cpool/testgram

Regards,
Adam

--
Adam Goryachev Website Managers www.websitemanagers.com.au
--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631iu=/4140/ostg.clktrk___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/
--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631iu=/4140/ostg.clktrk___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/


Re: [BackupPC-users] BackupPC-4.0.0alpha3 - Can't create a test hardlink between a file...

2015-02-06 Thread Mark Gordon
Thoughts anyone?

From: akibufl...@outlook.com
To: backuppc-users@lists.sourceforge.net
Date: Wed, 28 Jan 2015 14:44:52 -0800
Subject: [BackupPC-users] BackupPC-4.0.0alpha3 - Can't create a test hardlink 
between a file...




I am having a bit of a problem starting  
BackupPC-4.0.0alpha3 on my debian (jessie) system.  When I run the 
command:  /etc/init.d/backuppc start as user backuppc or as root, I 
get the following output:

Starting backuppc: 2015-01-28 17:12:12
 Can't create a test hardlink between a file in /data/BackupPC/pc and 
/data/BackupPC/cpool.  Either these are different file systems, or this 
file system doesn't support hardlinks, or these directories don't exist,
 or there is a permissions problem, or the file system is out of inodes 
or full.  Use df, df -i, and ls -ld to check each of these 
possibilities. Quitting...

They are not different file systems 
they are ext4; the directories do exist and the permissions appear to be
 correct (755).  Additionally, the filesystem is not out of inodes and 
is not full.  Here are some outputs:

backuppc@linux-pc5:/data/BackupPC$ ls -la
total 20
drwxr-x--- 5 backuppc backuppc 4096 Jan 18 23:00 .
drwxr-x--- 3 root root 4096 Jan 18 23:00 ..
drwxr-x--- 2 backuppc backuppc 4096 Jan 24 22:12 cpool
drwxr-x--- 2 backuppc backuppc 4096 Jan 24 22:12 pc
drwxr-x--- 2 backuppc backuppc 4096 Jan 18 23:00 pool

backuppc@linux-pc5:/data/BackupPC$ ls -ld
drwxr-x--- 5 backuppc backuppc 4096 Jan 18 23:00 .

backuppc@linux-pc5:/data/BackupPC$ df
Filesystem  1K-blocks   Used Available Use% 
Mounted on
/dev/mapper/dreux-root   190921803932116  14167196  22% /
udev10240  0 10240   0% /dev
tmpfs  811664   9264802400   2% /run
tmpfs 2029152468   2028684   1% 
/dev/shm
tmpfs5120  4  5116   1% 
/run/lock
tmpfs 2029152  0   2029152   0% 
/sys/fs/cgroup
/dev/mapper/dreux-tmp 9480420  21528   8954268   1% /tmp
/dev/mapper/dreux-home   95987468 219424  90869024   1% 
/home
/dev/mapper/dreux-var287037402334664  24887964   9% /var
/dev/mapper/backup--disk-backup--files 1907367732 1602751460 207704504  89% 
/media
tmpfs  405832  8405824   1% 
/run/user/1000

backuppc@linux-pc5:/data/BackupPC$ df -i
FilesystemInodes   IUsed IFree IUse% 
Mounted on
/dev/mapper/dreux-root   1220608  159087   1061521   14% /
udev  505105 5055046001% /dev
tmpfs 507288 7545065341% /run
tmpfs 507288  105072781% 
/dev/shm
tmpfs 507288   65072821% 
/run/lock
tmpfs 507288  135072751% 
/sys/fs/cgroup
/dev/mapper/dreux-tmp 610800  356107651% /tmp
/dev/mapper/dreux-home   61112321807   61094251% /home
/dev/mapper/dreux-var18314248989   18224351% /var
/dev/mapper/backup--disk-backup--files 121126912 3392309 1177346033% /media
tmpfs 507288  185072701% 
/run/user/1000

Any
 suggestions as to what the problem is?  It is probably something simple
 but I am not that well versed on debian (or any other flavor for that 
matter).  Thanks.

akibuflash

btw, when I run the start command /etc/init.d/backuppc start as another user, 
I get the following output:

Starting backuppc: /etc/init.d/backuppc: 37: /etc/init.d/backuppc: 
start-stop-daemon: not found

From: akibufl...@outlook.com
To: backuppc-users@lists.sourceforge.net
Date: Wed, 28 Jan 2015 14:44:52 -0800
Subject: [BackupPC-users] BackupPC-4.0.0alpha3 - Can't create a test hardlink 
between a file...




I am having a bit of a problem starting  BackupPC-4.0.0alpha3 on my debian 
(jessie) system.  When I run the command:  /etc/init.d/backuppc start as user 
backuppc or as root, I get the following output:

Starting backuppc: 2015-01-28 17:12:12 Can't create a test hardlink between a 
file in /data/BackupPC/pc and /data/BackupPC/cpool.  Either these are different 
file systems, or this file system doesn't support hardlinks, or these 
directories don't exist, or there is a permissions problem, or the file system 
is out of inodes or full.  Use df, df -i, and ls -ld to check each of these 
possibilities. Quitting...

They are not different file systems they are ext4; the directories do exist and 
the permissions appear to be correct (755).  Additionally, the filesystem is 
not out of inodes and is not full.  Here are some outputs: