Project

General

Profile

Bug #19281

While running online backup tasks as a root user via cron fails with error " sh: runuser: command not found "

Added by Ashish Humbe over 2 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Backup & Restore
Target version:
Difficulty:
Triaged:
Yes
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

Description of problem:

Online backup does not work via cronjob.

Backup log:

Creating backup folder /shared/data/satellite-backup/
Backing up config files...
tar: Removing leading `/' from member names
Done.
Backing up postgres db...
sh: runuser: command not found
sh: runuser: command not found
Done.
Backing up mongo db...
Done.
Backing up Pulp data...
tar: Removing leading `/' from member names
Done.
  • BACKUP Complete, contents can be found in: /shared/data/satellite-backup/ **

Steps to Reproduce:

1. Setup a cronjob for online backup using below steps:

As a root user

  1. crontab -e

Add the cron entry as below:

00 23 * * * /usr/bin/katello-backup --online-backup /backup/ >> /backup/backup.log 2>&1

2. Monitor the backup.log file.

Actual results:

While backing up foreman and candlepin database fail with errors:

Backing up postgres db...
sh: runuser: command not found
sh: runuser: command not found
Done.

Expected results:
The katello-backup script should work via cron job too.

Associated revisions

Revision afcd9167 (diff)
Added by John Mitsch about 2 years ago

Fixes #19281 - Move katello commands to sbin

History

#1 Updated by The Foreman Bot over 2 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello-packaging/pull/427 added

#2 Updated by John Mitsch over 2 years ago

  • Legacy Backlogs Release (now unused) set to 211

#3 Updated by Justin Sherrill over 2 years ago

  • Legacy Backlogs Release (now unused) changed from 211 to 228

#4 Updated by Eric Helms over 2 years ago

  • Legacy Backlogs Release (now unused) changed from 228 to 258

#5 Updated by John Mitsch over 2 years ago

We've agreed to fix this in the spec file by adding these scripts to /usr/sbin

#6 Updated by Eric Helms about 2 years ago

  • Legacy Backlogs Release (now unused) changed from 258 to 267

#7 Updated by Eric Helms about 2 years ago

  • Status changed from Ready For Testing to Assigned
  • Pull request deleted (https://github.com/Katello/katello-packaging/pull/427)

#8 Updated by Justin Sherrill about 2 years ago

  • Legacy Backlogs Release (now unused) changed from 267 to 281

#9 Updated by The Foreman Bot about 2 years ago

  • Status changed from Assigned to Ready For Testing
  • Assignee set to John Mitsch
  • Pull request https://github.com/Katello/katello-packaging/pull/488 added

#10 Updated by John Mitsch about 2 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#11 Updated by Brad Buckingham about 2 years ago

  • Target version set to 205

Also available in: Atom PDF