SearchFAQMemberlist Log in
Reply to topic Page 1 of 1
cron and permissions problem
Author Message
Post cron and permissions problem 
I am having a problem with rsnapshot's cron jobs and retaining
permissions on files backed up by rsnapshot.

I have the following in my root's crontab -e

0 */4 * * * root /usr/bin/rsnapshot hourly
30 3 * * * root /usr/bin/rsnapshot daily
0 3 * * 1 root /usr/bin/rsnapshot weekly
30 2 1 * * root /usr/bin/rsnapshot monthly

The cron jobs appear not to be running and there are no hourly.,
daily. directories being created in the destination directory.

Also when I manually run rsnapshot as root, all the files are given
root:root ownership. Is this normal? I was under the impression that
the files ownership should be maintained.

Thanks,
-Rob

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss

Post cron and permissions problem 
On Wed, Feb 1, 2012 at 19:41, Robert Longfield
<robert.longfield < at > gmail.com> wrote:
I am having a problem with rsnapshot's cron jobs and retaining
permissions on files backed up by rsnapshot.

I have the following in my root's crontab -e

0 */4  * * *           root    /usr/bin/rsnapshot hourly
30 3   * * *           root    /usr/bin/rsnapshot daily
0  3   * * 1           root    /usr/bin/rsnapshot weekly
30 2   1 * *           root    /usr/bin/rsnapshot monthly

The cron jobs appear not to be running and there are no hourly.,
daily. directories being created in the destination directory.

Check your syslog for cron's log output.

Also when I manually run rsnapshot as root, all the files are given
root:root ownership. Is this normal? I was under the impression that
the files ownership should be maintained.

All files? What file system are you storing your snapshots on (ext3,
ext4, xfs, ntfs, fat32...) and what operating system are you using?

--
                 Please keep list traffic on the list.

Rob MacGregor
      Whoever fights monsters should see to it that in the process he
        doesn't become a monster.                  Friedrich Nietzsche

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss

Post cron and permissions problem 
On Wed, Feb 1, 2012 at 2:58 PM, Rob MacGregor <rob.macgregor < at > gmail.com> wrote:
On Wed, Feb 1, 2012 at 19:41, Robert Longfield
<robert.longfield < at > gmail.com> wrote:
I am having a problem with rsnapshot's cron jobs and retaining
permissions on files backed up by rsnapshot.

I have the following in my root's crontab -e

0 */4  * * *           root    /usr/bin/rsnapshot hourly
30 3   * * *           root    /usr/bin/rsnapshot daily
0  3   * * 1           root    /usr/bin/rsnapshot weekly
30 2   1 * *           root    /usr/bin/rsnapshot monthly

The cron jobs appear not to be running and there are no hourly.,
daily. directories being created in the destination directory.

Check your syslog for cron's log output.

Ok so syslog says:

Feb  1 08:00:01 KITSrv01 /USR/SBIN/CRON[5437]: (root) CMD (root
/usr/bin/rsnapshot hourly)
Feb  1 08:00:01 KITSrv01 /USR/SBIN/CRON[5435]: (CRON) error
(grandchild #5437 failed with exit status 127)

Which I believe means that cron is unable to find rsnapshot in
/usr/bin. I know it is there however as I can manually run
'/usr/bin/rsnapshot hourly'




Also when I manually run rsnapshot as root, all the files are given
root:root ownership. Is this normal? I was under the impression that
the files ownership should be maintained.

All files? What file system are you storing your snapshots on (ext3,
ext4, xfs, ntfs, fat32...) and what operating system are you using?

I guess all that is important info I should have included the first time.
Yes all files and directories are being assigned ownership and group
of root:root
I'm running on Debian 6, the backups are being written to an external
USB HD with a NTFS file system. That's probably the problem isn't it.




--
                 Please keep list traffic on the list.

Rob MacGregor
      Whoever fights monsters should see to it that in the process he
        doesn't become a monster.                  Friedrich Nietzsche

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss

Post cron and permissions problem 
Hallo, Robert,

Du meintest am 01.02.12:

I have the following in my root's crontab -e

0 */4 * * * root /usr/bin/rsnapshot hourly
30 3 * * * root /usr/bin/rsnapshot daily
0 3 * * 1 root /usr/bin/rsnapshot weekly
30 2 1 * * root /usr/bin/rsnapshot monthly

When you invoke (as root)

crontab -e

then you edit root's cronjob table, and this table must not contain an
owner column (here: "root").

Viele Gruesse!
Helmut

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss

Post cron and permissions problem 
On Wed, Feb 1, 2012 at 20:19, Robert Longfield
<robert.longfield < at > gmail.com> wrote:
Which I believe means that cron is unable to find rsnapshot in
/usr/bin. I know it is there however as I can manually run
'/usr/bin/rsnapshot hourly'

Have you configured rsnapshot to write to a log file? What is in that log file?

I guess all that is important info I should have included the first time.
Yes all files and directories are being assigned ownership and group
of root:root
I'm running on Debian 6, the backups are being written to an external
USB HD with a NTFS file system. That's probably the problem isn't it.

it certainly won't be helping. Try formatting it with ext3, ext4 or
your Linux file system of choice.

--
                 Please keep list traffic on the list.

Rob MacGregor
      Whoever fights monsters should see to it that in the process he
        doesn't become a monster.                  Friedrich Nietzsche

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss

Post cron and permissions problem 
On Wed, Feb 1, 2012 at 4:25 PM, Helmut Hullen <Hullen < at > t-online.de> wrote:
Hallo, Robert,

Du meintest am 01.02.12:

I have the following in my root's crontab -e

0 */4  * * *           root    /usr/bin/rsnapshot hourly
30 3   * * *           root    /usr/bin/rsnapshot daily
0  3   * * 1           root    /usr/bin/rsnapshot weekly
30 2   1 * *           root    /usr/bin/rsnapshot monthly

When you invoke (as root)

       crontab -e

then you edit root's cronjob table, and this table must not contain an
owner column (here: "root").

Viele Gruesse!
Helmut

This one is critical. Why are you using "crontab -e"? Why not drop a
file in /etc/cron.d/rsnapshot.cron with these contents? I know a lot
of people like to edit user crontab files, just like a lot of people
like to edit /etc/rc.local directly, but this is difficult to manage
multiple services.

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss

Post cron and permissions problem 
On Thu, Feb 2, 2012 at 04:27, Nico Kadel-Garcia <nkadel < at > gmail.com ([email]nkadel < at > gmail.com[/email])> wrote:
Why not drop a
file in /etc/cron.d/rsnapshot.cron with these contents?


Personally I don't like the idea to spread cron jobs across everywhere: crontab, /etc/cron.d, /etc/cron.{daily,weekly,monthly}, /etc/crontab. While crontab is quite easy to invoke and gives the full overview.
--
С уважением Владимир В. Бережной

Post cron and permissions problem 
Hallo, Nico,

Du meintest am 01.02.12:

When you invoke (as root)

       crontab -e

then you edit root's cronjob table, and this table must not contain
an owner column (here: "root").


This one is critical. Why are you using "crontab -e"?

I do so since more than 15 years ...

Viele Gruesse!
Helmut

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss

Post cron and permissions problem 
On Thu, Feb 2, 2012 at 1:44 AM, Владимир Бережной <non7top < at > gmail.com> wrote:
On Thu, Feb 2, 2012 at 04:27, Nico Kadel-Garcia <nkadel < at > gmail.com> wrote:

Why not drop a
file in /etc/cron.d/rsnapshot.cron with these contents?


Personally I don't like the idea to spread cron jobs across everywhere:
crontab, /etc/cron.d, /etc/cron.{daily,weekly,monthly}, /etc/crontab. While
crontab is quite easy to invoke and gives the full overview.

And easy as heck to screw up for all your *other* cron jobs. I split
up my rsnapshot configurations as one for each target machine for the
same reason: it limits the destructive capability of errors.

Putting them in /etc/cron.d/rasnapshot.cron, or distributing them in
/etc/cron.daily/, /etc/cron.hourly/, etc. allows a level of source
control via tools like RCS for tracking and registering configuration
changes that a merged /var/spool/cron/root, used for many purposes,
cannot hope to match and which cannot be gracefully put under source
control at all.

There's nothing quite like finding 3 systems doing similar tasks, one
of which used 'crontab -e', another of which put it in /etc/crontab,
another used /etc/cron.d/ files, etc., etc. For rsnapshot, I really
think we're better off using /etc/cron.d/rsnapshot.cron: it can
contain all the rsnapshot related tasks in a well-defined structure,
especially tasks that are not so obviously rsnapshot related such as
remotely executed database backup jobs to get a snapshottable backup
file.

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss

Display posts from previous:
Reply to topic Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
  


Magic SEO URL for phpBB