dump/restore and crontab(5)

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

dump/restore and crontab(5)

Ed Ahlsen-Girard-2
Having clobbered my crontab (5) file in error (-r and -e are close) I
merrily went to my level 0 dump to restore it. It's present on the dump
(which is to file) but the restored file is zero bytes.

Should I have run those dumps manually instead of as cron jobs?

--

Edward Ahlsen-Girard
Ft Walton Beach, FL


Reply | Threaded
Open this post in threaded view
|

Re: dump/restore and crontab(5)

Solene Rapenne

Ed Ahlsen-Girard writes:

> Having clobbered my crontab (5) file in error (-r and -e are close) I
> merrily went to my level 0 dump to restore it. It's present on the dump
> (which is to file) but the restored file is zero bytes.
>
> Should I have run those dumps manually instead of as cron jobs?

What arguments did you use to backup with dump?

What arguments did you use to restore with restore?

If you found the file using restore, then it should not be zero-length.

Reply | Threaded
Open this post in threaded view
|

Re: dump/restore and crontab(5)

trondd-2
In reply to this post by Ed Ahlsen-Girard-2
On Mon, July 2, 2018 8:14 am, Ed Ahlsen-Girard wrote:

> Having clobbered my crontab (5) file in error (-r and -e are close) I
> merrily went to my level 0 dump to restore it. It's present on the dump
> (which is to file) but the restored file is zero bytes.
>
> Should I have run those dumps manually instead of as cron jobs?
>
> --
>
> Edward Ahlsen-Girard
> Ft Walton Beach, FL
>

I'd have to look later to see if my dumps are coreectly grabbing the
crontabs.  But first, try looking in /var/backups either on disk, or in
your dump.

Tim.

Reply | Threaded
Open this post in threaded view
|

Re: dump/restore and crontab(5)

Solene Rapenne

trondd writes:

> On Mon, July 2, 2018 8:14 am, Ed Ahlsen-Girard wrote:
>> Having clobbered my crontab (5) file in error (-r and -e are close) I
>> merrily went to my level 0 dump to restore it. It's present on the dump
>> (which is to file) but the restored file is zero bytes.
>>
>> Should I have run those dumps manually instead of as cron jobs?
>>
>> --
>>
>> Edward Ahlsen-Girard
>> Ft Walton Beach, FL
>>
>
> I'd have to look later to see if my dumps are coreectly grabbing the
> crontabs.  But first, try looking in /var/backups either on disk, or in
> your dump.
>
> Tim.

Indeed, you can find your last file in
/var/backups/var_cron_tabs_root.backup or
/var/backups/var_cron_tabs_root.current

Those files are created by security(8) script, which should be run every
day at 1h30.

Reply | Threaded
Open this post in threaded view
|

Re: dump/restore and crontab(5)

Ed Ahlsen-Girard-2
In reply to this post by Ed Ahlsen-Girard-2
On Mon, 2 Jul 2018 09:25:37 -0400
"trondd" <[hidden email]> wrote:

> On Mon, July 2, 2018 8:14 am, Ed Ahlsen-Girard wrote:
>  [...]  
>
> I'd have to look later to see if my dumps are coreectly grabbing the
> crontabs.  But first, try looking in /var/backups either on disk, or
> in your dump.
>
> Tim.
>

In the backups. Thanks.

--

Edward Ahlsen-Girard
Ft Walton Beach, FL


Reply | Threaded
Open this post in threaded view
|

Re: dump/restore and crontab(5)

trondd-2
On Mon, July 2, 2018 10:26 am, Ed Ahlsen-Girard wrote:

> On Mon, 2 Jul 2018 09:25:37 -0400
> "trondd" <[hidden email]> wrote:
>
>> On Mon, July 2, 2018 8:14 am, Ed Ahlsen-Girard wrote:
>>  [...]
>>
>> I'd have to look later to see if my dumps are coreectly grabbing the
>> crontabs.  But first, try looking in /var/backups either on disk, or
>> in your dump.
>>
>> Tim.
>>
>
> In the backups. Thanks.
>
> --
>
> Edward Ahlsen-Girard
> Ft Walton Beach, FL
>

FYI.  dump/restore is correctly saving and restoring my /var/cron/tabs/*
so double check your dump and restore scripts, parameters, whatever.

Tim.