Owncloud disk crashed, data is safe, how to set up a new server












3















Our Owncloud server's disk crashed, beyond repair. All the data is stored on mounted disks (RAID-1), and these seem intact. I have to confess that we don't have a backup of the configuration, as far as I can tell.



Is there a way to safely re-create an Owncloud server using existing data disks on Linux?



Update: screenshot



Screenshot of db files










share|improve this question









New contributor




D.Bugger is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

























    3















    Our Owncloud server's disk crashed, beyond repair. All the data is stored on mounted disks (RAID-1), and these seem intact. I have to confess that we don't have a backup of the configuration, as far as I can tell.



    Is there a way to safely re-create an Owncloud server using existing data disks on Linux?



    Update: screenshot



    Screenshot of db files










    share|improve this question









    New contributor




    D.Bugger is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.























      3












      3








      3








      Our Owncloud server's disk crashed, beyond repair. All the data is stored on mounted disks (RAID-1), and these seem intact. I have to confess that we don't have a backup of the configuration, as far as I can tell.



      Is there a way to safely re-create an Owncloud server using existing data disks on Linux?



      Update: screenshot



      Screenshot of db files










      share|improve this question









      New contributor




      D.Bugger is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.












      Our Owncloud server's disk crashed, beyond repair. All the data is stored on mounted disks (RAID-1), and these seem intact. I have to confess that we don't have a backup of the configuration, as far as I can tell.



      Is there a way to safely re-create an Owncloud server using existing data disks on Linux?



      Update: screenshot



      Screenshot of db files







      linux owncloud






      share|improve this question









      New contributor




      D.Bugger is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question









      New contributor




      D.Bugger is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question








      edited 4 hours ago







      D.Bugger













      New contributor




      D.Bugger is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 6 hours ago









      D.BuggerD.Bugger

      1164




      1164




      New contributor




      D.Bugger is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      D.Bugger is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      D.Bugger is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






















          2 Answers
          2






          active

          oldest

          votes


















          2














          This depends what is on that disks that are not dead. If this includes all data directories and, most importantly, the Mysql/Postgresql database, you should have not lost anything except the time to setup a new instance and get stuff working again.



          If this doesn't include the database, you are in a bad situation, as you have lost all management information and things like application data (e.g. addressbooks and calender entries). You are still not totally screwed, as at least the actual data files should be present if Owncloud indeed stored that on the still alive disks. There will be directories for every user and group containing the last state of every file, and you can use those to reimport everything into a new instance.






          share|improve this answer
























          • Yes, all data directories and the database are there. I updated the question with a screenshot. Is there a description somewhere how to set up the new instance and connect it to the data?

            – D.Bugger
            4 hours ago



















          0














          Please note: These steps are only partially tested.



          If you had enabled file encryption, I have bad news for you: As the config.php the secret key, the files cannot be restored.



          If not, I would suggest following steps:




          • Backup what you currently have.


          • Download and extract a fresh copy of OwnCloud



          • Recreate the config as good as you can:




            • Set the database type and path (as you have database file I would guess the database type is sqlite)

            • Set dbtableprefix to your prefix (default is oc_). In doubt, look into your database.

            • Set datadirectory to your data directory

            • Set installed to true.



          • Restore the data directory. It must have the same path as the old one, or OwnCloud won't find the files.


          As you have lost the password salt, you have to set new passwords for all users.



          Use the occ command to reset the passwords:



          $ sudo -u www-data php /var/www/owncloud/occ user:resetpassword admin
          Enter a new password:
          Confirm the new password:
          Successfully reset password for admin


          After you login, you should have file access again. If you cannot download the files and get 404 errors, the data directory is probably not at the same location as it was previously.






          share|improve this answer








          New contributor




          S. Biewald is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.




















            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "2"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });






            D.Bugger is a new contributor. Be nice, and check out our Code of Conduct.










            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f950935%2fowncloud-disk-crashed-data-is-safe-how-to-set-up-a-new-server%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            2














            This depends what is on that disks that are not dead. If this includes all data directories and, most importantly, the Mysql/Postgresql database, you should have not lost anything except the time to setup a new instance and get stuff working again.



            If this doesn't include the database, you are in a bad situation, as you have lost all management information and things like application data (e.g. addressbooks and calender entries). You are still not totally screwed, as at least the actual data files should be present if Owncloud indeed stored that on the still alive disks. There will be directories for every user and group containing the last state of every file, and you can use those to reimport everything into a new instance.






            share|improve this answer
























            • Yes, all data directories and the database are there. I updated the question with a screenshot. Is there a description somewhere how to set up the new instance and connect it to the data?

              – D.Bugger
              4 hours ago
















            2














            This depends what is on that disks that are not dead. If this includes all data directories and, most importantly, the Mysql/Postgresql database, you should have not lost anything except the time to setup a new instance and get stuff working again.



            If this doesn't include the database, you are in a bad situation, as you have lost all management information and things like application data (e.g. addressbooks and calender entries). You are still not totally screwed, as at least the actual data files should be present if Owncloud indeed stored that on the still alive disks. There will be directories for every user and group containing the last state of every file, and you can use those to reimport everything into a new instance.






            share|improve this answer
























            • Yes, all data directories and the database are there. I updated the question with a screenshot. Is there a description somewhere how to set up the new instance and connect it to the data?

              – D.Bugger
              4 hours ago














            2












            2








            2







            This depends what is on that disks that are not dead. If this includes all data directories and, most importantly, the Mysql/Postgresql database, you should have not lost anything except the time to setup a new instance and get stuff working again.



            If this doesn't include the database, you are in a bad situation, as you have lost all management information and things like application data (e.g. addressbooks and calender entries). You are still not totally screwed, as at least the actual data files should be present if Owncloud indeed stored that on the still alive disks. There will be directories for every user and group containing the last state of every file, and you can use those to reimport everything into a new instance.






            share|improve this answer













            This depends what is on that disks that are not dead. If this includes all data directories and, most importantly, the Mysql/Postgresql database, you should have not lost anything except the time to setup a new instance and get stuff working again.



            If this doesn't include the database, you are in a bad situation, as you have lost all management information and things like application data (e.g. addressbooks and calender entries). You are still not totally screwed, as at least the actual data files should be present if Owncloud indeed stored that on the still alive disks. There will be directories for every user and group containing the last state of every file, and you can use those to reimport everything into a new instance.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered 5 hours ago









            SvenSven

            86.1k10144198




            86.1k10144198













            • Yes, all data directories and the database are there. I updated the question with a screenshot. Is there a description somewhere how to set up the new instance and connect it to the data?

              – D.Bugger
              4 hours ago



















            • Yes, all data directories and the database are there. I updated the question with a screenshot. Is there a description somewhere how to set up the new instance and connect it to the data?

              – D.Bugger
              4 hours ago

















            Yes, all data directories and the database are there. I updated the question with a screenshot. Is there a description somewhere how to set up the new instance and connect it to the data?

            – D.Bugger
            4 hours ago





            Yes, all data directories and the database are there. I updated the question with a screenshot. Is there a description somewhere how to set up the new instance and connect it to the data?

            – D.Bugger
            4 hours ago













            0














            Please note: These steps are only partially tested.



            If you had enabled file encryption, I have bad news for you: As the config.php the secret key, the files cannot be restored.



            If not, I would suggest following steps:




            • Backup what you currently have.


            • Download and extract a fresh copy of OwnCloud



            • Recreate the config as good as you can:




              • Set the database type and path (as you have database file I would guess the database type is sqlite)

              • Set dbtableprefix to your prefix (default is oc_). In doubt, look into your database.

              • Set datadirectory to your data directory

              • Set installed to true.



            • Restore the data directory. It must have the same path as the old one, or OwnCloud won't find the files.


            As you have lost the password salt, you have to set new passwords for all users.



            Use the occ command to reset the passwords:



            $ sudo -u www-data php /var/www/owncloud/occ user:resetpassword admin
            Enter a new password:
            Confirm the new password:
            Successfully reset password for admin


            After you login, you should have file access again. If you cannot download the files and get 404 errors, the data directory is probably not at the same location as it was previously.






            share|improve this answer








            New contributor




            S. Biewald is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
            Check out our Code of Conduct.

























              0














              Please note: These steps are only partially tested.



              If you had enabled file encryption, I have bad news for you: As the config.php the secret key, the files cannot be restored.



              If not, I would suggest following steps:




              • Backup what you currently have.


              • Download and extract a fresh copy of OwnCloud



              • Recreate the config as good as you can:




                • Set the database type and path (as you have database file I would guess the database type is sqlite)

                • Set dbtableprefix to your prefix (default is oc_). In doubt, look into your database.

                • Set datadirectory to your data directory

                • Set installed to true.



              • Restore the data directory. It must have the same path as the old one, or OwnCloud won't find the files.


              As you have lost the password salt, you have to set new passwords for all users.



              Use the occ command to reset the passwords:



              $ sudo -u www-data php /var/www/owncloud/occ user:resetpassword admin
              Enter a new password:
              Confirm the new password:
              Successfully reset password for admin


              After you login, you should have file access again. If you cannot download the files and get 404 errors, the data directory is probably not at the same location as it was previously.






              share|improve this answer








              New contributor




              S. Biewald is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
              Check out our Code of Conduct.























                0












                0








                0







                Please note: These steps are only partially tested.



                If you had enabled file encryption, I have bad news for you: As the config.php the secret key, the files cannot be restored.



                If not, I would suggest following steps:




                • Backup what you currently have.


                • Download and extract a fresh copy of OwnCloud



                • Recreate the config as good as you can:




                  • Set the database type and path (as you have database file I would guess the database type is sqlite)

                  • Set dbtableprefix to your prefix (default is oc_). In doubt, look into your database.

                  • Set datadirectory to your data directory

                  • Set installed to true.



                • Restore the data directory. It must have the same path as the old one, or OwnCloud won't find the files.


                As you have lost the password salt, you have to set new passwords for all users.



                Use the occ command to reset the passwords:



                $ sudo -u www-data php /var/www/owncloud/occ user:resetpassword admin
                Enter a new password:
                Confirm the new password:
                Successfully reset password for admin


                After you login, you should have file access again. If you cannot download the files and get 404 errors, the data directory is probably not at the same location as it was previously.






                share|improve this answer








                New contributor




                S. Biewald is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.










                Please note: These steps are only partially tested.



                If you had enabled file encryption, I have bad news for you: As the config.php the secret key, the files cannot be restored.



                If not, I would suggest following steps:




                • Backup what you currently have.


                • Download and extract a fresh copy of OwnCloud



                • Recreate the config as good as you can:




                  • Set the database type and path (as you have database file I would guess the database type is sqlite)

                  • Set dbtableprefix to your prefix (default is oc_). In doubt, look into your database.

                  • Set datadirectory to your data directory

                  • Set installed to true.



                • Restore the data directory. It must have the same path as the old one, or OwnCloud won't find the files.


                As you have lost the password salt, you have to set new passwords for all users.



                Use the occ command to reset the passwords:



                $ sudo -u www-data php /var/www/owncloud/occ user:resetpassword admin
                Enter a new password:
                Confirm the new password:
                Successfully reset password for admin


                After you login, you should have file access again. If you cannot download the files and get 404 errors, the data directory is probably not at the same location as it was previously.







                share|improve this answer








                New contributor




                S. Biewald is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.









                share|improve this answer



                share|improve this answer






                New contributor




                S. Biewald is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.









                answered 1 hour ago









                S. BiewaldS. Biewald

                1




                1




                New contributor




                S. Biewald is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.





                New contributor





                S. Biewald is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.






                S. Biewald is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.






















                    D.Bugger is a new contributor. Be nice, and check out our Code of Conduct.










                    draft saved

                    draft discarded


















                    D.Bugger is a new contributor. Be nice, and check out our Code of Conduct.













                    D.Bugger is a new contributor. Be nice, and check out our Code of Conduct.












                    D.Bugger is a new contributor. Be nice, and check out our Code of Conduct.
















                    Thanks for contributing an answer to Server Fault!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f950935%2fowncloud-disk-crashed-data-is-safe-how-to-set-up-a-new-server%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Loup dans la culture

                    How to solve the problem of ntp “Unable to contact time server” from KDE?

                    ASUS Zenbook UX433/UX333 — Configure Touchpad-embedded numpad on Linux