Bug 356558

Summary: rsnapshot fails completely, packaging error: require Lchown.
Product: [openSUSE] openSUSE 10.3 Reporter: Carlos Robinson <carlos.e.r>
Component: MaintenanceAssignee: Hendrik Vogelsang <hvogel>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: bernhardkausler, miniwark
Version: Final   
Target Milestone: ---   
Hardware: Other   
OS: openSUSE 10.3   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: configuration file as requested

Description Carlos Robinson 2008-01-28 02:10:44 UTC
backup application rsnapshot fails completely. This is the normal output:

  nimrodel:~ # rsnapshot daily
  nimrodel:~ # 


Nothing. In linux parlance, that means success, but it took 0.2 seconds to completion. Impossible!

The log contained this single sentence:

  Jan 28 03:05:12 nimrodel rsnapshot[14815]: /usr/bin/rsnapshot daily: completed successfully


Configuring for a very verbose log, this is what I get instead:

  nimrodel:~ # rsnapshot daily
  require Lchown
  Lchown module not found
  Setting locale to POSIX "C"
  echo 3970 > /var/run/rsnapshot.pid
  rm -f /var/run/rsnapshot.pid
  /bin/logger -i -p user.info -t rsnapshot /usr/bin/rsnapshot daily: \
      completed successfully
  nimrodel:~ #


It claims success, but it did nothing, took less than a second to exit. 

It requires "Lchown", which comes in package "perl-lchown", which you forgot to include in the distro. Worse, rsnapshot does not depend on perl-lchown, the installer doesn't advise of this requirement.

Further more, it is MNSHO that a backup application that claims success when it fact it failed utterly is a very bad backup app that should not have been included in opensuse as not having the expected quality! :-/

I will have to search for another backup utility, as I wont be able to ever trust rsnapshot again even if it claimed success!
Comment 1 Michael Skibbe 2008-01-31 09:34:46 UTC
first of all this bug is not Major! this is a normal bug.

(In reply to comment #0 from Carlos Robinson)
> It requires "Lchown", which comes in package "perl-lchown", which you forgot to
> include in the distro. Worse, rsnapshot does not depend on perl-lchown, the
> installer doesn't advise of this requirement.

i will fix this requirement
 
> Further more, it is MNSHO that a backup application that claims success when it
> fact it failed utterly is a very bad backup app that should not have been
> included in opensuse as not having the expected quality! :-/

rsnapshot is imho the best tool to backup data over ssh/rsync/local/smb for more than one computer. i use this tool since months and it works fine - i never had problems before. no one knows each bug of an application (this is the first rsnapshot bug since rsnapshot is on opensuse). if you say a tool has a worse quality because it has one ugly bug what do you say about something like kde or the kernel which have hundreds of bugs.

> I will have to search for another backup utility, as I wont be able to ever
> trust rsnapshot again even if it claimed success!

i will report such a "broken-by-concept"-problem on rsnapshot devel list. i hope they will think about return codes then and fix this issue.

Comment 2 Carlos Robinson 2008-01-31 11:41:53 UTC
(In reply to comment #1 from Michael Skibbe)
> first of all this bug is not Major! this is a normal bug.
> 

Sorry, but that is not so.

Per your company description at <https://bugzilla.novell.com/page.cgi?id=fields.html#bug_severity>

] Severity
] -------
]
] This field describes the impact of a bug.
] Blocker 	Blocks development and/or testing work
] Critical 	Crash, loss of data, corruption of data, severe memory leak
] Major 	Major loss of function
] Normal 	Non-major loss of function
] Minor 	Issue that can be viewed as trivial (e.g. cosmetic, UI,
]    easily documented)
] Enhancement   	Request for enhancement

This bug is reall "Major", as it the application involved has a "Major loss of function".

I propose that you change it back to Major or change the definition of Major appropriately. Notice that the description doesn't say "loss of function in the distro", so most people assume it is "loss of function in the affected app"

> (In reply to comment #0 from Carlos Robinson)
> > It requires "Lchown", which comes in package "perl-lchown", which you forgot to
> > include in the distro. Worse, rsnapshot does not depend on perl-lchown, the
> > installer doesn't advise of this requirement.
> 
> i will fix this requirement

Thanks. You will have to include the package as well, it is not in the distro.


> > Further more, it is MNSHO that a backup application that claims success when it
> > fact it failed utterly is a very bad backup app that should not have been
> > included in opensuse as not having the expected quality! :-/
> 
> rsnapshot is imho the best tool to backup data over ssh/rsync/local/smb for
> more than one computer. i use this tool since months and it works fine - i
> never had problems before. no one knows each bug of an application (this is the
> first rsnapshot bug since rsnapshot is on opensuse). if you say a tool has a
> worse quality because it has one ugly bug what do you say about something like
> kde or the kernel which have hundreds of bugs.


I consider claiming success when it failed completely is very very bad, imho. I can not trust a backup app that claims success and failed completely.

It is two bugs: 1) the missing perl-lchown is not detected by " rsnapshot configtest" or later, unless I activate log verbosity 5, during normal run. And 2) it claims success when failing. It is the second one which I consider worst.

A person might have it programmed in cron, check the log: success, success, success.... and there would be nothing done. It might take him sometime to discover that there is a problem.


Look, I consider this application very interesting, and I'm surprised that nobody has found this problem before in 10.3. I didn't know it before and I'm in the process of testing possibilities, instead of using my own script with plain rsync. I was very disappointed to find it fail in such a way, I certainly didn't expect it, because I really wanted to use it.

If I have been harsh is because I felt very disappointed after my expectations!

   (And yes, I also have reported bugs against the kernel, 
   causing whole system crashes / lock-ups. 
   This kernel is worse than 10.2's)



> i will report such a "broken-by-concept"-problem on rsnapshot devel list. i
> hope they will think about return codes then and fix this issue.

Thanks.
Comment 3 Michael Skibbe 2008-01-31 12:21:38 UTC
on a 10.3:

boris:~ # rsnapshot -v daily
echo 24372 > /var/run/rsnapshot.pid 
mv /space/backup/daily.0/ /space/backup/daily.1/ 
/space/backup/hourly.11 not present (yet), nothing to copy
rm -f /var/run/rsnapshot.pid


---

please send me your configuration file because i'm not able to reproduce this.
Comment 4 Carlos Robinson 2008-01-31 18:55:18 UTC
Created attachment 192613 [details]
configuration file as requested

I have rechecked my configuration file and I can't see anything wrong, and "configtest" doesn't complain. I have followed the howto in:
<http://www.rsnapshot.org/howto/1.2/rsnapshot-HOWTO.en.html#configuration>

My modifications to the default config are (checked with "diff"):

snapshot_root   /mnt/usb/usb_sg60/rsnapshot/ 
no_create_root  1 
cmd_ssh /usr/bin/ssh 
#interval       hourly  6 
verbose         5 
backup  /home/          nimrodel_casa/
backup  /etc/           mimrodel_syst/
backup  /usr/local/     nimrodel_syst_usr_local/ 


The output (verbose = 5) is this:


nimrodel:~ # rsnapshot configtest
require Lchown
Lchown module not found
Syntax OK

nimrodel:~ # time rsnapshot daily
require Lchown
Lchown module not found
Setting locale to POSIX "C"
echo 10682 > /var/run/rsnapshot.pid 
rm -f /var/run/rsnapshot.pid 
/bin/logger -i -p user.info -t rsnapshot /usr/bin/rsnapshot daily: \
    completed successfully 

real    0m0.206s
user    0m0.172s
sys     0m0.024s
Comment 7 Carlos Robinson 2008-02-29 13:55:00 UTC
Sorry for the delay.

The mail says:

] The main issue is that he has
] sync_first 1
] and he is trying to follow the rsnapshot howto for 1.2, which assumes
] sync_first=0 (actually that version of the HowTo was written before
] sync_first was implemented). I am not aware of any newer howto
] (for rsnapshot 1.3).

The problem is that "sync_first 1" is what the file "/etc/rsnapshot.conf.default" has. Those settings mentioned there as wrong are precisely the default configuration settings as distributed with opensuse 10.3. I didn't change them.

"link_dest 1" is also in the default config file.

I now did the recommended change to "sync_first 0", and tried a test backup: doesn't work, either. See:


nimrodel:~ # time rsnapshot -t daily
echo 13694 > /var/run/rsnapshot.pid 
mkdir -m 0755 -p /mnt/usb/usb_sg60/rsnapshot/daily.0/ 
/usr/bin/rsync -a --delete --numeric-ids --relative --delete-excluded /home \
    /mnt/usb/usb_sg60/rsnapshot/daily.0/nimrodel/ 
mkdir -m 0755 -p /mnt/usb/usb_sg60/rsnapshot/daily.0/ 
/usr/bin/rsync -a --delete --numeric-ids --relative --delete-excluded /etc \
    /mnt/usb/usb_sg60/rsnapshot/daily.0/mimrodel/ 
mkdir -m 0755 -p /mnt/usb/usb_sg60/rsnapshot/daily.0/ 
/usr/bin/rsync -a --delete --numeric-ids --relative --delete-excluded \
    /usr/local /mnt/usb/usb_sg60/rsnapshot/daily.0/nimrodel/ 
touch /mnt/usb/usb_sg60/rsnapshot/daily.0/ 

real    0m0.202s
user    0m0.150s
sys     0m0.040s


There is nothing under "/mnt/usb/usb_sg60/rsnapshot". I increase again verbosity level to "5", but there is nothing more. Nothing is written to "/var/log/rsnapshot", nor to the syslog. No directory was created:

nimrodel:~ # l /mnt/usb/usb_sg60/rsnapshot/
total 0
drwxr-xr-x 2 root root  48 Jan 27 19:37 ./
drwxr-xr-x 8 root root 248 Jan 28 23:57 ../


I don't know what to try or do, since the howto is obviously wrong. For people that have used the program previously that might be ok, but for me, it is stumbling block.

If I try a weekly backup, it says there is no daily one.

As to try daily, hourly, etc... I would rather do backups when I please, and have them timestamped. But I don't know how to do that.



Comment 8 Hendrik Vogelsang 2008-03-12 13:41:18 UTC
sync_first is not on in the default config anymore. this is the only "bug" that was in the package. That the configuration HOWTO is somewhat wrong is not a bug we can fix. 
Comment 9 Carlos Robinson 2008-03-12 14:20:40 UTC
If it solved, how come it does nothing?

The package is still broken and useless.
Comment 10 Hendrik Vogelsang 2008-03-12 14:36:43 UTC
This must be your configuration then

# rpm -q rsnapshot
rsnapshot-1.3.0-68

# diff /etc/rsnapshot.conf.default /etc/rsnapshot.conf
57c57
< cmd_ssh       /path/to/ssh
---
> cmd_ssh               /usr/bin/ssh
176c176
< sync_first    1
---
> # sync_first  0

# ls /.snapshots/hourly.0/localhost/
etc  home  usr

# l /.snapshots/hourly.0/localhost/etc/fstab 
-rw-r--r-- 1 root root 922 Jan  8 12:55 /.snapshots/hourly.0/localhost/etc/fstab
Comment 11 Carlos Robinson 2008-03-13 14:04:34 UTC
I know what was the problem. 

By comment #7 I was doing "rsnapshot -t daily" instead of "rsnapshot daily" (as I did on day one). The -t option! It means "test, do nothing".

Shame on me for not noticing.... :-(

I guess by that moment so much time had passed since my first reading the docs that I somehow misread. It is working now.

So, to conclude.

The howto is outdated and the default config was wrong, leading the program to fail. Once that config is corrected it runs ok. I can not trust the docs and thus I do not know what I do, but it works ok.

Thanks for your help in this and sorry for the wrong report on #7.

I guess I can close it myself and save you time O:-)
Comment 12 Bertrand Lecervoisier 2008-05-14 17:10:14 UTC
I have try rsnapshot too on Opensuse 10.2
using the 1.2.9-23 packaged version

-> Just keeping the default config file and make
# rsnapshot hourly

do notning except creating the ./snapshots directory.
( Normaly at last /home ; /etc and /usr/local should be copied under ./snapshots/hourly.0/localhost )

-> Changing  "sync_first  1" to "sync_first  0" works :-)

-> Setting the verbose level to 5 claim about the missing of Lchown as reported by Carlos but apparently package can make a hourly snapshot without it.

-> Instaling the package perl-lchown from here :
http://download.opensuse.org/repositories/Archiving:/Backup/openSUSE_10.2/
- Correct the alert about lchwon
- And work with "sync_first  0" option in config script

-> Updating to rsnapshot 1.3 from Archiving:/Backup/openSUSE_10.2/ lead to default config file not working by default on openSUSE because of the following line :
cmd_ssh	/path/to/ssh

-> Changing this line to
cmd_ssh	/usr/bin/ssh

Give a fine working package :-)

-> 

I reopen the ticket because :
The actual distributed official package still have a little package bug :
- Package install did not check for perl-lchown on onpenSUSE 10.2
- Have an error in the default config file
The 1.3 package from /Archiving:/Backup/openSUSE_10.2/ :
- Have a config file not adapted to OpenSuse default place for ssh executable

See also for this bug :
http://linux.derkeiler.com/Mailing-Lists/SuSE/2008-01/msg03004.html
Comment 13 Hendrik Vogelsang 2008-05-19 09:52:19 UTC
This problem is very minor and we cannot introduce new dependencies with an update so we wont make the update.

I fix the problem with the package in Archiving:Backup.
Comment 14 Bernhard Kausler 2008-06-04 09:34:13 UTC
Just to point it out: Rsnapshot has no "Major loss of function", but does just what is it told to do.
Read the man page carefully:
 
"rsnapshot sync

When sync_first is enabled, rsnapshot must first be called with the sync argument, followed by the other usual cron entries. The sync should happen as the lowest, most frequent interval, and right before. For example:

                   0 */4 * * *         /usr/bin/rsnapshot sync && /usr/bin/rsnapshot hourly

                   50 23 * * *         /usr/bin/rsnapshot daily

                   40 23 1,8,15,22 * * /usr/bin/rsnapshot weekly

                   30 23 1 * *         /usr/bin/rsnapshot monthly

The sync operation simply runs rsync and all backup scripts. In this scenario, all interval calls simply rotate directories, even the lowest interval."

The package maintainer f****d this one up, but rsnapshot is innocent ;)