LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-13-2015, 04:53 AM   #1
Mobilink
LQ Newbie
 
Registered: Sep 2015
Posts: 18

Rep: Reputation: Disabled
Dump problem with crontab


Hi,

how we can use Dump in crontab for backing up directory, I have done the following configuration in crontab to accomplish this.

00 01 * * * /sbin/dump -0 f /backup/abc.bkp /home

This command run but the dump return the error
"dumping /home (an unlisted file system to backup.bkp"
"cannot open /home "
"the entire dump is aborted"

I want to backup this directory on the / path and no tape drive is used, also want to set incremental backup of my home directory. How we will do that let say on Saturday full backup is perform and than from Monday to Friday incremental backup is performed using crontab.

Regards

Furqan Ahmed
 
Old 11-13-2015, 05:18 AM   #2
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
only root can backup /home.
Code:
ls -ld /home
drwxr-xr-x 5 root root 4096 Aug 11 2015  1:32 PM /home
so, you'll have to have elevated privileges, or stick the cron job in root's cron.

Who is running this cron job?
 
Old 11-13-2015, 05:20 AM   #3
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Does this command run correctly when you type it in the interactive shell?
Have you compared the command invocation with the man page?
Edit: Use the -v option for more information.

Last edited by berndbausch; 11-13-2015 at 05:34 AM.
 
Old 11-13-2015, 05:58 AM   #4
Mobilink
LQ Newbie
 
Registered: Sep 2015
Posts: 18

Original Poster
Rep: Reputation: Disabled
hi,

yes this command is working fine when we run it from shell.

Regards

Furqan ahmed
 
Old 11-13-2015, 10:11 AM   #5
serverpoint.com
Member
 
Registered: Oct 2015
Posts: 52

Rep: Reputation: 6
Does the dump command works if you only specify the dumpfile name?

Last edited by serverpoint.com; 11-13-2015 at 10:20 AM. Reason: last one was wrong
 
Old 11-14-2015, 12:09 AM   #6
Mobilink
LQ Newbie
 
Registered: Sep 2015
Posts: 18

Original Poster
Rep: Reputation: Disabled
yes it is work fine when we specified the dump file name. but nor working in crontab

Regards

furqan ahmed
 
Old 11-14-2015, 02:02 AM   #7
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by Mobilink View Post
yes it is work fine when we specified the dump file name. but nor working in crontab.
Is this the crontab for root?
If yes, wrap the dump command in a shell script that checks access to /home.
If not, run it as root.
If there is no solution, perhaps it's related to SElinux?
 
Old 11-16-2015, 01:47 AM   #8
Mobilink
LQ Newbie
 
Registered: Sep 2015
Posts: 18

Original Poster
Rep: Reputation: Disabled
hi,

This crontab is run by user root, I will check this by using script.

regards

furqan ahmed
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Problem with crontab:: command not executed properly via crontab Ankush Seth Linux - Newbie 11 11-11-2013 06:25 AM
Creating a core dump from raw ram dump? cyent Programming 2 08-15-2010 05:57 PM
Core dump when running from crontab ph_trooper Linux - General 12 10-23-2009 10:05 AM
crontab dump... j_miguel_y Linux - General 1 07-14-2004 02:57 PM
How to forcely dump the history of user commands to the admin dump file. mcp_achindra Linux - Security 1 03-19-2004 12:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:51 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration