DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 25th January 2020
stanl stanl is offline
Real Name: Stan
Fdisk Soldier
 
Join Date: Jun 2019
Posts: 64
Default rsnapshot daily not running

I've got the following in /etc/rsnapshot.conf:

Quote:
retain hourly 6
retain daily 7
And the following in root's crontab:

Quote:
# run rsnapshot every 4 hours at 0 minutes
0 */4 * * * /usr/local/bin/rsnapshot hourly
# run rsnapshot daily at 23:30
30 23 * * * /usr/local/bin/rsnapshot daily
Hourly runs with no problem. Daily returns:
/.snapshots/hourly.5 not present (yet), nothing to copy

(hourly.5 does in fact exist)

I have no idea what I am missing or doing wrong. Any help is appreciated.

Thank you
Reply With Quote
  #2   (View Single Post)  
Old 25th January 2020
TronDD TronDD is offline
Spam Deminer
 
Join Date: Sep 2014
Posts: 221
Default

You're missing patience.

It's just a warning because it rotates through all the name.x directories when it runs. When you first start using rsnapshot, those backups haven't been made and don't exist yet. Once you get through enough backups, the directory will be there and it'll stop warning.
Reply With Quote
  #3   (View Single Post)  
Old 26th January 2020
stanl stanl is offline
Real Name: Stan
Fdisk Soldier
 
Join Date: Jun 2019
Posts: 64
Default

Thank you for that. Any idea how long it takes as I've been running rsnapshot continuously for about 3 days now and still no daily backup.
Reply With Quote
  #4   (View Single Post)  
Old 26th January 2020
TronDD TronDD is offline
Spam Deminer
 
Join Date: Sep 2014
Posts: 221
Default

Daily should run at 11:30 pm. The warning about a missing hourly shouldn't stop it.

You have no daily backups? Do you see anything in the log at 23:30?
Reply With Quote
  #5   (View Single Post)  
Old 27th January 2020
stanl stanl is offline
Real Name: Stan
Fdisk Soldier
 
Join Date: Jun 2019
Posts: 64
Default

From the log:
[quote]
[2020-01-25T23:30:01] /usr/local/bin/rsnapshot daily: started
[2020-01-25T23:30:01] echo 70126 > /var/run/rsnapshot.pid
[2020-01-25T23:30:01] /shadow/.snapshots/hourly.5 not present (yet), nothing to copy
[2020-01-25T23:30:01] rm -f /var/run/rsnapshot.pid
[2020-01-25T23:30:01] /usr/local/bin/rsnapshot daily: completed successfully
[\quote]

Despite what the log says hourly.5 does exist and there is no daily.

At this point I think I'll just keep hourly and forget about daily.

Thanks
Reply With Quote
  #6   (View Single Post)  
Old 27th January 2020
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 6,973
Default

Quote:
Originally Posted by stanl View Post
...At this point I think I'll just keep hourly and forget about daily.
You have additional options:
  1. If this is an operational issue perceived to be OpenBSD-specific, you may contact the port's maintainer, Antoine Jacoutot. His Email address can be obtained with $ pkg_info rsnapshot.
  2. Report the problem to the rsnapshot project using their Github issue tracker.
Reply With Quote
  #7   (View Single Post)  
Old 27th January 2020
stanl stanl is offline
Real Name: Stan
Fdisk Soldier
 
Join Date: Jun 2019
Posts: 64
Default

Thank you, jggimi.
I'm going to let rsnapshot run for another 24 hours. If I don't see a daily backup I will contact the port maintainer as you suggest.
Reply With Quote
  #8   (View Single Post)  
Old 27th January 2020
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 6,973
Default

FWIW, here's a brief HOWTO from Solène Rapenne for rsnapshot on OpenBSD.
She notes several possible provisioning missteps, which you may want to check for to ensure you haven't accidentally made them:

https://dataswamp.org/~solene/2020-01-10-rsnapshot.html
Reply With Quote
  #9   (View Single Post)  
Old 27th January 2020
stanl stanl is offline
Real Name: Stan
Fdisk Soldier
 
Join Date: Jun 2019
Posts: 64
Default

Thanks for that, but it was from Solene's post that I first learned of rsnapshot.
I suppose reading thru it again might not be a bad idea tho...
Reply With Quote
Old 27th January 2020
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 6,973
Default

If a configuration review doesn't highlight any errors, you might consider reaching out to her also.
Reply With Quote
Old 28th January 2020
TronDD TronDD is offline
Spam Deminer
 
Join Date: Sep 2014
Posts: 221
Default

I don't know why your daily is looking for an hourly at all. Mine does not. What other options do you have set in rsnapshot.conf? Do you have sync_first or something?

If you run daily manually as root in trial mode, what do you get.
rsnapshot -vt daily
Reply With Quote
Old 28th January 2020
stanl stanl is offline
Real Name: Stan
Fdisk Soldier
 
Join Date: Jun 2019
Posts: 64
Default

Quote:
absalom# rsnapshot -vt daily
echo 13848 > /var/run/rsnapshot.pid
/shadow/.snapshots/hourly.5 not present (yet), nothing to copy
absalom#


absalom# mount /shadow
absalom# cd /shadow
absalom# ls -a
. .snapshots
absalom# cd .snapshots/

absalom# ls -lh
total 24
drwxr-xr-x 3 root wheel 512B Jan 27 20:00 hourly.0
drwxr-xr-x 3 root wheel 512B Jan 27 16:00 hourly.1
drwxr-xr-x 3 root wheel 512B Jan 27 12:00 hourly.2
drwxr-xr-x 3 root wheel 512B Jan 27 06:00 hourly.3
drwxr-xr-x 3 root wheel 512B Jan 27 00:01 hourly.4
drwxr-xr-x 3 root wheel 512B Jan 26 16:00 hourly.5
absalom#

Root's crontab entries:

# run rsnapshot every 4 hours at 0 minutes
22 0 */4 * * * /usr/local/bin/rsnapshot hourly
# run rsnapshot daily at 23:30
30 23 * * * /usr/local/bin/rsnapshot daily
~
diff /etc/rsnapshot.conf /etc/rsnapshot.conf.org:
Quote:
23c23
< snapshot_root /shadow/.snapshots/
---
> snapshot_root /.snapshots/
63c63
< cmd_du /usr/bin/du
---
> #cmd_du /usr/bin/du
67c67
< cmd_rsnapshot_diff /usr/local/bin/rsnapshot-diff
---
> #cmd_rsnapshot_diff /usr/local/bin/rsnapshot-diff
73c73
< cmd_preexec /root/mount_shadow
---
>
78c78
< cmd_postexec /root/umount_shadow
---
>
93,94c93,96
< retain hourly 6
< retain daily 7
---
> retain alpha 6
> retain beta 7
> retain gamma 4
> #retain delta 3
108c110
< verbose 3
---
> verbose 2
118c120
< logfile /var/log/rsnapshot
---
> #logfile /var/log/rsnapshot
146c148
< du_args -csh
---
> #du_args -cs224,226c226,232
< backup /home/ shadow/.snapshot/myfiles/
< backup /etc/ shadow/.snapshots/etc/
< backup /var/ shadow/.snaphots/var/
---
> #backup /home/ localhost/
> #backup /etc/ localhost/
> #backup /usr/local/ localhost/
> #backup /var/log/rsnapshot localhost/
> #backup /etc/passwd localhost/
> #backup /home/foo/My Documents/ localhost/
> #backup /foo/bar/ localhost/ one_fs=1, rsync_short_args=-urltvpog
229c235
< #backup lvm://vg0/xen-home/ lvm-vg0/xen-home/
---
> #backup lvm://vg0/xen-home/ lvm-vg0/xen-home/
Reply With Quote
Old 28th January 2020
TronDD TronDD is offline
Spam Deminer
 
Join Date: Sep 2014
Posts: 221
Default

Some of your hourly directories are 6 hours apart, not 4.

I would delete all the backups and let rsnapshot recreate everything. Just let it run for a day.

Less relevant:
In your backup statements, you can use just the path relative to snapshot_root, you don't need the whole path. I assume you're getting many depths of path in your backup that you don't need.

You also have a '.snapshot' vs '.snapshots' that would be avoided by not specifying the full path there.
Reply With Quote
Old 28th January 2020
stanl stanl is offline
Real Name: Stan
Fdisk Soldier
 
Join Date: Jun 2019
Posts: 64
Default

Thank you. I will make the changes in the conf file and do as you suggest.
Reply With Quote
Old 28th January 2020
TronDD TronDD is offline
Spam Deminer
 
Join Date: Sep 2014
Posts: 221
Default

I hate to say, "delete and start over", but as I was reconfiguring my set up, I had to do that, too.
Reply With Quote
Old 5th February 2020
stanl stanl is offline
Real Name: Stan
Fdisk Soldier
 
Join Date: Jun 2019
Posts: 64
Default

Just an update on my rsnapshot problems.
I did a pkg_delete and removed rsnapshot as well as all backups. I then reinstalled, re-configured and tried again. Same problem - hourly works fine, daily refuses to create a backup saying hourly.5 does not exist (which, in fact, it does) nothing to copy.

Per jggimi's suggestion I contacted the port maintainer who asked me to try to run rsnapshot manually. Same problem. I'm now waiting to see if he comes back to me with any
ideas.

Meanwhile, I did a little experimenting on my own and found that I can get a daily backup if hourly is commented out in /etc/rsnapshot.conf. Similarly, I can run a manual backup but only if every other backup scenario is commented out in the config file. In other words, I can run any backup I want but only if it is the only backup specified in the config file.
Reply With Quote
Old 5th February 2020
TronDD TronDD is offline
Spam Deminer
 
Join Date: Sep 2014
Posts: 221
Default

Ok, I just replicated this with your config and a fresh snapshot_root.

I think I see what's happening. Obviously, you have to let hourly run 6 times to get to hourly.5.

Then when daily runs, it works, but MOVES hourly.5 to daily.0 so hourly.5 is now gone. Hourly has to run again before daily succeeds again.

Also, check your mount and unmount scripts that they are working. Maybe comment them out and leave the partition mounted and manually run the steps.
Reply With Quote
Old 6th February 2020
stanl stanl is offline
Real Name: Stan
Fdisk Soldier
 
Join Date: Jun 2019
Posts: 64
Default

I will do as you suggest. And many thanks for taking the time to help me with this. I do appreciate it.

After doing as you suggested everything seems to be running properly. Thanks again for your help.

Last edited by stanl; 8th February 2020 at 02:00 PM.
Reply With Quote
Reply

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
root's crontab vs daily.local beavers OpenBSD General 2 8th January 2020 11:13 AM
Daily Insecurity Output stanl OpenBSD Security 2 8th August 2019 02:12 PM
/etc/daily gives incorrect warning acampbell OpenBSD General 8 12th May 2017 04:12 AM
Problem getting php running badguy OpenBSD General 7 22nd July 2009 03:34 PM
FreeBSD server, Windows clients, daily backups Weaseal FreeBSD General 4 25th December 2008 05:50 PM


All times are GMT. The time now is 07:36 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick