• header.categories
    • header.recent
    • header.tags
    • header.popular
    • register
    • login

    automatic backup

    scheduled pinned locked moved Troubleshooting
    18 posts 2 posters 4.0k views 1 watching
    loading-more-posts
    • oldest-to-newest
    • newest-to-oldest
    • most-votes
    reply
    • reply-as-topic
    guest-login-reply
    deleted-message
    • jkandasaJ offline
      jkandasa @Daniele
      global:last-edited-by,

      @daniele As you have mentioned 1 days, it needs 24 hours to perform its first backup. You may do an hourly backup with 5~10 retention files might be enough. When you configure hourly backup, you may lose only hour data, if something goes wrong.

      one-reply-to-this-post last-reply-time reply quote 0
      • D offline
        Daniele
        global:last-edited-by,

        I forgot to mention that's one week I set it up this way

        jkandasaJ one-reply-to-this-post last-reply-time reply quote 0
        • jkandasaJ offline
          jkandasa @Daniele
          global:last-edited-by,

          @daniele Do you see any error in the log file? mycontroller/logs/mycontroller.log

          one-reply-to-this-post last-reply-time reply quote 0
          • D offline
            Daniele
            global:last-edited-by,

            I can find many errors of this kind:

            [Wed Dec 20 22:25:35 CET 2017] IO error: java.net.SocketException: Connection reset in processing a request from /192.168.1.165:8443 / sun.security.ssl.SSLSocketImpl
            [Wed Dec 20 23:17:03 CET 2017] IO error: javax.net.ssl.SSLException: Connection has been shutdown: javax.net.ssl.SSLHandshakeException: Received fatal alert: certificate_unknown in processi
            ng a request from /192.168.1.164:8443 / sun.security.ssl.SSLSocketImpl
            

            I'm not an expert programmer, but they don't seem to be related to my issue with automatic backup.

            jkandasaJ one-reply-to-this-post last-reply-time reply quote 0
            • jkandasaJ offline
              jkandasa @Daniele
              global:last-edited-by,

              @daniele Without debug log it is tough to root cause this issue. Could you please do the followings on your MyController server to get debug logs?

              Enable debug log message for the followings on mycontroller/conf/logback.xml,

                <logger level="DEBUG" name="org.mycontroller.standalone.backup" />
                <logger level="DEBUG" name="org.mycontroller.standalone.scheduler" />
                <logger level="DEBUG" name="org.mycontroller.standalone.timer" />
              

              NOTE: MyController server restart is required to apply this change.
              To stop: mycontroller/bin/stop.sh
              To start: mycontroller/bin/start.sh

              After this change, modify your backup settings to take backup in one minute. Now check logs on mycontroller/logs/mycontroller.log

              0_1513862661016_Screenshot from 2017-12-21 17-49-54.png

              one-reply-to-this-post last-reply-time reply quote 0
              • D offline
                Daniele
                global:last-edited-by,

                The odd thing is that yesterday I tried with 5 minutes, and it worked.
                Then I moved to 12 hours, and the backup has never been created.

                I activated the debug logs you suggested, tried again with 1 minute and 1 hour, and everything worked perfectly.
                Now I moved again to one day, I'll let you know the result.

                jkandasaJ one-reply-to-this-post last-reply-time reply quote 0
                • jkandasaJ offline
                  jkandasa @Daniele
                  global:last-edited-by,

                  @daniele Great! Seems we might have an issue with 12 hours or more. let me check it.

                  one-reply-to-this-post last-reply-time reply quote 0
                  • D offline
                    Daniele
                    global:last-edited-by,

                    After 1 day with debug enabled I can't see any other error, but still no backup.
                    Now I tried to set it up every 10 hours, I'll let you know the result.

                    one-reply-to-this-post last-reply-time reply quote 0
                    • D offline
                      Daniele
                      global:last-edited-by,

                      Same result with 10 hours, while I got a successful backup with 8 hours.

                      jkandasaJ topic:replies-to-this-post, 2 last-reply-time reply quote 0
                      • jkandasaJ offline
                        jkandasa @Daniele
                        global:last-edited-by, jkandasa

                        @daniele Thanks to narrow down this issue. I will have a look on the code.

                        https://github.com/mycontroller-org/mycontroller/issues/431

                        one-reply-to-this-post last-reply-time reply quote 0
                        • jkandasaJ offline
                          jkandasa @Daniele
                          global:last-edited-by,

                          @daniele I have update scheduler library. I do not see this issue now. Also, I have added an option to show next execution time. Kindly check it in SNAPSHOT version and let me know.

                          Thank you!

                          0_1518324492744_b1071f89-22c0-4126-ba1a-09ad60ca68c2-image.png

                          one-reply-to-this-post last-reply-time reply quote 0
                          • D offline
                            Daniele
                            global:last-edited-by,

                            Yesterday evening at 10 PM I changed the schedule from "every 8 hours" to "every 1 day", to check the change you did.
                            This evening I'll check the result, but what I notice in the meantime is that there's something wrong in the label showing the next execution:

                            0_1518509051050_64ef58ba-47e8-43ea-9ea0-1ea1c9fed471-image.png

                            jkandasaJ one-reply-to-this-post last-reply-time reply quote 0
                            • jkandasaJ offline
                              jkandasa @Daniele
                              global:last-edited-by,

                              @daniele Thank you! Can you check the Uptime on your MyController server?

                              0_1518538194415_d4f4f6a3-d927-461c-8b4b-87311f2e615b-image.png

                              one-reply-to-this-post last-reply-time reply quote 0
                              • D offline
                                Daniele
                                global:last-edited-by,

                                This is the uptime of my server:

                                0_1518539526668_404d31c9-c662-4abf-8c77-12030b111259-image.png

                                To simplify your analysis: 4 AM is the time I daily restart my Raspberry.

                                jkandasaJ one-reply-to-this-post last-reply-time reply quote 0
                                • jkandasaJ offline
                                  jkandasa @Daniele
                                  global:last-edited-by,

                                  @daniele

                                  To simplify your analysis: 4 AM is the time I daily restart my Raspberry.

                                  That's the root cause. MyController backup job not following cron or regular time. It is following repeat time from the scheduled time. When you restart the server this timer also gets restarted. For your setup, you can configure a maximum of 23 hours and 59 minutes if you configure it exactly at startup.

                                  So if you configure backup every > 12 hours and < 24 hours, you should get daily backup from next day.

                                  one-reply-to-this-post last-reply-time reply quote 0
                                  • D offline
                                    Daniele
                                    global:last-edited-by,

                                    Now that's clear, I'll try using 23 hours.
                                    Thanks!

                                    one-reply-to-this-post last-reply-time reply quote 1
                                    • D offline
                                      Daniele
                                      global:last-edited-by,

                                      I can confirm that with 23 hours the scheduler works perfectly now!
                                      Thanks a lot!

                                      one-reply-to-this-post last-reply-time reply quote 1
                                      • first-post
                                        last-post

                                      0

                                      online

                                      644

                                      users

                                      532

                                      topics

                                      3.4k

                                      posts
                                      Copyright © 2015-2025 MyController.org | Contributors | Localization