{"id":1067,"date":"2019-03-08T17:29:01","date_gmt":"2019-03-08T21:29:01","guid":{"rendered":"http:\/\/io.bainwerx.com\/blog\/?p=1067"},"modified":"2019-03-08T17:38:15","modified_gmt":"2019-03-08T21:38:15","slug":"raspberry-pi-mounting-an-nfs-boot","status":"publish","type":"post","link":"https:\/\/io.bainwerx.com\/blog\/raspberry-pi-mounting-an-nfs-boot\/","title":{"rendered":"Raspberry Pi &#8211; Mounting an NFS @ boot"},"content":{"rendered":"\n<p>I have an &#8220;every 3rd night backup&#8221; script that&#8217;s been crashing out, and it&#8217;s because as soon as I log off the system drops the file share&#8230;so the system forgets where to store backups.<\/p>\n\n\n\n<p>So using the logic of the following crontab that works I&#8217;ve made my own slightly customized version&#8230;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>@reboot sleep 30 &amp;&amp; python \/path\/to\/your\/script.py &amp;<\/code><\/pre>\n\n\n\n<p>Reverse engineering the code, the secret sauce is actually in the sleep 30, which is basically telling the system to wait for a few ticks before running the following command&#8230;which ironically waits just long enough for the network stack to be fully up and running and then mount.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>@reboot sleep 30 &amp;&amp; sudo mount -t nfs 192.168.1.8:\/volume1\/pi \/media\/SYNOLOGY<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>I have an &#8220;every 3rd night backup&#8221; script that&#8217;s been crashing out, and it&#8217;s because as soon as I log off the system drops the file share&#8230;so the system forgets where to store backups. So using the logic of the following crontab that works I&#8217;ve made my own slightly customized version&#8230; Reverse engineering the code, &hellip; <a href=\"https:\/\/io.bainwerx.com\/blog\/raspberry-pi-mounting-an-nfs-boot\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Raspberry Pi &#8211; Mounting an NFS @ boot<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":1077,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[75],"tags":[],"class_list":["post-1067","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-raspberry-pi","with-featured-image"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/io.bainwerx.com\/blog\/wp-content\/uploads\/2019\/03\/raspberry_.jpg?fit=125%2C125&ssl=1","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8DcKP-hd","jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/io.bainwerx.com\/blog\/wp-json\/wp\/v2\/posts\/1067","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/io.bainwerx.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/io.bainwerx.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/io.bainwerx.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/io.bainwerx.com\/blog\/wp-json\/wp\/v2\/comments?post=1067"}],"version-history":[{"count":1,"href":"https:\/\/io.bainwerx.com\/blog\/wp-json\/wp\/v2\/posts\/1067\/revisions"}],"predecessor-version":[{"id":1068,"href":"https:\/\/io.bainwerx.com\/blog\/wp-json\/wp\/v2\/posts\/1067\/revisions\/1068"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/io.bainwerx.com\/blog\/wp-json\/wp\/v2\/media\/1077"}],"wp:attachment":[{"href":"https:\/\/io.bainwerx.com\/blog\/wp-json\/wp\/v2\/media?parent=1067"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/io.bainwerx.com\/blog\/wp-json\/wp\/v2\/categories?post=1067"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/io.bainwerx.com\/blog\/wp-json\/wp\/v2\/tags?post=1067"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}