ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Nextcloud Backup System Idea

    IT Discussion
    backup and disaster recovery backup nextcloud storage
    9
    41
    2.5k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • black3dynamiteB
      black3dynamite @EddieJennings
      last edited by black3dynamite

      @EddieJennings said in Backup System Idea:

      @black3dynamite said in Backup System Idea:

      Now this is off the top of my head.
      You have restic installed on your Nextcloud VM and Backup VM.
      Restic is configured to backup the following folders:

      • config folder
      • data folder
      • theme folder

      You make a backup of your database. You can probably leave out the date +"%Y%m%d since restic timestamp your snapshots.

      mysqldump --single-transaction -h [server] -u [username] -p[password] [db_name] > nextcloud-sqlbkp_`date +"%Y%m%d"`.bak
      

      Have restic backup your database that you've just backed up.

      • database

      After restic completes it backups to the Backup VM, then setup restic on your Backup VM to backup that data to Backblaze.

      I'll take a look at that. For the database, you described what I'm thinking about doing. Backing up the database, and then backup the resultant file to the Backup VM and then to the cloud storage.

      My concerns is how long you have to set Nextcloud in maintenance mode. Any new or modified data on the client will not be synced back to Nextcloud until your backup is finished. Now if you are backing up the VM itself, then it shouldn't be an issue.

      EddieJenningsE 1 Reply Last reply Reply Quote 0
      • EddieJenningsE
        EddieJennings @black3dynamite
        last edited by

        @black3dynamite said in Backup System Idea:

        @EddieJennings said in Backup System Idea:

        @black3dynamite said in Backup System Idea:

        Now this is off the top of my head.
        You have restic installed on your Nextcloud VM and Backup VM.
        Restic is configured to backup the following folders:

        • config folder
        • data folder
        • theme folder

        You make a backup of your database. You can probably leave out the date +"%Y%m%d since restic timestamp your snapshots.

        mysqldump --single-transaction -h [server] -u [username] -p[password] [db_name] > nextcloud-sqlbkp_`date +"%Y%m%d"`.bak
        

        Have restic backup your database that you've just backed up.

        • database

        After restic completes it backups to the Backup VM, then setup restic on your Backup VM to backup that data to Backblaze.

        I'll take a look at that. For the database, you described what I'm thinking about doing. Backing up the database, and then backup the resultant file to the Backup VM and then to the cloud storage.

        My concerns is how long you have to set Nextcloud in maintenance mode. Any new or modified data on the client will not be synced back to Nextcloud until your backup is finished. Now if you are backing up the VM itself, then it shouldn't be an issue.

        For this situation, I am the only user of Nextcloud, so I could script taking it and out of maintenance mode when I'd be sleeping. I can see the concern in an environment with multiple users that could be accessing Nextcloud at any time.

        1 Reply Last reply Reply Quote 0
        • black3dynamiteB
          black3dynamite
          last edited by black3dynamite

          This person create a automatic backup using restic that sends the backup to Backblaze
          It can email notifications on failure too.
          https://github.com/erikw/restic-systemd-automatic-backup

          1 Reply Last reply Reply Quote 1
          • black3dynamiteB
            black3dynamite
            last edited by

            Here's a more straight forward auto backup to Google Drive using restic that can tweak for backing up Nextcloud VM to your Backup VM and then use the script from erikw or use the this same script to backup to Backblaze.
            https://jakobkofod.com/automated-restic-backups-google-drive/

            1 Reply Last reply Reply Quote 0
            • ObsolesceO
              Obsolesce @EddieJennings
              last edited by

              @EddieJennings

              Restic does backups really well and efficiently. I use Restic on my VPS and back up to my personal OneDrive via Rclone.

              https://timothygruber.com/backup-and-restore/back-up-linux-vps-to-onedrive-via-restic-and-rclone/

              The initial backup will take a bit, but the incrementals... you won't even notice.

              1 Reply Last reply Reply Quote 2
              • DustinB3403D
                DustinB3403
                last edited by

                To ask and to be that guy;

                Why does it sound as if NextCloud is going to be installed to the bare metal with the potential for a separate "Backup VM"?

                As for the backup solution, you can use tools like Restic, Duplicati, UrBackup or really anything you want. Have that tool backup to a local storage media and then copy those to a cloud provider.

                EddieJenningsE 1 Reply Last reply Reply Quote 1
                • EddieJenningsE
                  EddieJennings @DustinB3403
                  last edited by

                  @DustinB3403 said in Backup System Idea:

                  To ask and to be that guy;

                  Why does it sound as if NextCloud is going to be installed to the bare metal with the potential for a separate "Backup VM"?

                  As for the backup solution, you can use tools like Restic, Duplicati, UrBackup or really anything you want. Have that tool backup to a local storage media and then copy those to a cloud provider.

                  NextCloud isn't going to be installed on bare metal. I could just attach another qcow2 disk to the VM, mount it somewhere, and use that as the backup target.

                  The idea of the Backup VM is emulating something like what I might find in a production environment using something like Veeam, where you have a dedicated server (VM) that runs the backup software and is a target for the backed up data. Of course, this is overkill for what I'm doing (just backing up my NextCloud instance).

                  travisdh1T 1 Reply Last reply Reply Quote 0
                  • travisdh1T
                    travisdh1 @EddieJennings
                    last edited by

                    @EddieJennings said in Backup System Idea:

                    @DustinB3403 said in Backup System Idea:

                    To ask and to be that guy;

                    Why does it sound as if NextCloud is going to be installed to the bare metal with the potential for a separate "Backup VM"?

                    As for the backup solution, you can use tools like Restic, Duplicati, UrBackup or really anything you want. Have that tool backup to a local storage media and then copy those to a cloud provider.

                    NextCloud isn't going to be installed on bare metal. I could just attach another qcow2 disk to the VM, mount it somewhere, and use that as the backup target.

                    The idea of the Backup VM is emulating something like what I might find in a production environment using something like Veeam, where you have a dedicated server (VM) that runs the backup software and is a target for the backed up data. Of course, this is overkill for what I'm doing (just backing up my NextCloud instance).

                    Why not send the backup to either Backblaze B2 or Wasabi? If you want practice doing backups, might as well do it right. My B2 is costing me ~$1.25/month

                    EddieJenningsE 1 Reply Last reply Reply Quote 0
                    • EddieJenningsE
                      EddieJennings @travisdh1
                      last edited by

                      @travisdh1 said in Backup System Idea:

                      @EddieJennings said in Backup System Idea:

                      @DustinB3403 said in Backup System Idea:

                      To ask and to be that guy;

                      Why does it sound as if NextCloud is going to be installed to the bare metal with the potential for a separate "Backup VM"?

                      As for the backup solution, you can use tools like Restic, Duplicati, UrBackup or really anything you want. Have that tool backup to a local storage media and then copy those to a cloud provider.

                      NextCloud isn't going to be installed on bare metal. I could just attach another qcow2 disk to the VM, mount it somewhere, and use that as the backup target.

                      The idea of the Backup VM is emulating something like what I might find in a production environment using something like Veeam, where you have a dedicated server (VM) that runs the backup software and is a target for the backed up data. Of course, this is overkill for what I'm doing (just backing up my NextCloud instance).

                      Why not send the backup to either Backblaze B2 or Wasabi? If you want practice doing backups, might as well do it right. My B2 is costing me ~$1.25/month

                      So skip having a 3rd copy of the data (live, copy on aforementioned Backup VM, copy on Backblaze storage or some other provider)?

                      travisdh1T scottalanmillerS 2 Replies Last reply Reply Quote 0
                      • brandon220B
                        brandon220
                        last edited by

                        As important as backups are - I'm really surprised that NC has not integrated them into the software.
                        This thread is helpful as I was not aware of Restic. I normally make exports of the VM for NC backups.

                        JaredBuschJ 1 Reply Last reply Reply Quote 1
                        • travisdh1T
                          travisdh1 @EddieJennings
                          last edited by

                          @EddieJennings said in Nextcloud Backup System Idea:

                          @travisdh1 said in Backup System Idea:

                          @EddieJennings said in Backup System Idea:

                          @DustinB3403 said in Backup System Idea:

                          To ask and to be that guy;

                          Why does it sound as if NextCloud is going to be installed to the bare metal with the potential for a separate "Backup VM"?

                          As for the backup solution, you can use tools like Restic, Duplicati, UrBackup or really anything you want. Have that tool backup to a local storage media and then copy those to a cloud provider.

                          NextCloud isn't going to be installed on bare metal. I could just attach another qcow2 disk to the VM, mount it somewhere, and use that as the backup target.

                          The idea of the Backup VM is emulating something like what I might find in a production environment using something like Veeam, where you have a dedicated server (VM) that runs the backup software and is a target for the backed up data. Of course, this is overkill for what I'm doing (just backing up my NextCloud instance).

                          Why not send the backup to either Backblaze B2 or Wasabi? If you want practice doing backups, might as well do it right. My B2 is costing me ~$1.25/month

                          So skip having a 3rd copy of the data (live, copy on aforementioned Backup VM, copy on Backblaze storage or some other provider)?

                          But you don't have a 3rd copy currently with 1 of the 3 being on the same server.

                          Apparently I missed that you already have an offsite happening, so good on you.

                          Being that it's your home lab, is it really worth the expense of getting a real 3rd copy? Might not matter (value of the data compared to time to restore.)

                          EddieJenningsE 1 Reply Last reply Reply Quote 0
                          • EddieJenningsE
                            EddieJennings @travisdh1
                            last edited by

                            @travisdh1 said in Nextcloud Backup System Idea:

                            But you don't have a 3rd copy currently with 1 of the 3 being on the same server.

                            Yeah. Since this lab server is just a 1U in co-location, the best I could do for having an additional copy off of the Nextcloud VM is having another VM as a backup target. Of course, there's no real protection with that.

                            Apparently I missed that you already have an offsite happening, so good on you.

                            Nothing offsite yet. I'm trying to think all of this through before I create the Nextcloud VM and start storing data on it.

                            Being that it's your home lab, is it really worth the expense of getting a real 3rd copy? Might not matter (value of the data compared to time to restore.)

                            That's something I'm weighing as well. The only way I think I could get a real 3rd copy is have one on a second cloud storage provider, since having additional hardware in colo really isn't an option. I suppose I could store a copy at home as the 3rd copy, but that's more of make-a-way-to-have-a-3rd-copy-just-to-have-a-third-copy rather than as you suggested before "do it right."

                            DustinB3403D 1 Reply Last reply Reply Quote 2
                            • DustinB3403D
                              DustinB3403 @EddieJennings
                              last edited by

                              @EddieJennings said in Nextcloud Backup System Idea:

                              @travisdh1 said in Nextcloud Backup System Idea:

                              But you don't have a 3rd copy currently with 1 of the 3 being on the same server.

                              Yeah. Since this lab server is just a 1U in co-location, the best I could do for having an additional copy off of the Nextcloud VM is having another VM as a backup target. Of course, there's no real protection with that.

                              So the question to ask is why add the complexity of backing up to a VM that would reside on the same host? It's more complex for no gain.

                              Nothing offsite yet. I'm trying to think all of this through before I create the Nextcloud VM and start storing data on it.

                              This is good to do.

                              That's something I'm weighing as well. The only way I think I could get a real 3rd copy is have one on a second cloud storage provider, since having additional hardware in colo really isn't an option. I suppose I could store a copy at home as the 3rd copy, but that's more of make-a-way-to-have-a-3rd-copy-just-to-have-a-third-copy rather than as you suggested before "do it right."

                              Or you could setup a NextCloud instance on something like Vultr and replicate between your 1U and the actual remote VM.

                              1 Reply Last reply Reply Quote 1
                              • JaredBuschJ
                                JaredBusch
                                last edited by

                                @DustinB3403 and @travisdh1 are both missing the fucking point that while this may be a single 1u server in colo the point is to be a full lab design.

                                He absolutely should have a “backup” VM as this is what exists in reality.

                                It is replicating the real world on site copy.

                                DashrenderD EddieJenningsE 2 Replies Last reply Reply Quote 3
                                • JaredBuschJ
                                  JaredBusch @brandon220
                                  last edited by

                                  @brandon220 said in Nextcloud Backup System Idea:

                                  As important as backups are - I'm really surprised that NC has not integrated them into the software.
                                  This thread is helpful as I was not aware of Restic. I normally make exports of the VM for NC backups.

                                  I am surprised that they have not partnered with some provider.

                                  I wonder is someone could write a backup app that would backup the DB and up it to Backblaze

                                  DustinB3403D 1 Reply Last reply Reply Quote 1
                                  • DashrenderD
                                    Dashrender @JaredBusch
                                    last edited by

                                    @JaredBusch said in Nextcloud Backup System Idea:

                                    @DustinB3403 and @travisdh1 are both missing the fucking point that while this may be a single 1u server in colo the point is to be a full lab design.

                                    He absolutely should have a “backup” VM as this is what exists in reality.

                                    It is replicating the real world on site copy.

                                    This was my assumption as well - he's trying to mimic real life as best he can.

                                    JaredBuschJ 1 Reply Last reply Reply Quote 0
                                    • EddieJenningsE
                                      EddieJennings @JaredBusch
                                      last edited by

                                      @JaredBusch said in Nextcloud Backup System Idea:

                                      @DustinB3403 and @travisdh1 are both missing the fucking point that while this may be a single 1u server in colo the point is to be a full lab design.

                                      He absolutely should have a “backup” VM as this is what exists in reality.

                                      It is replicating the real world on site copy.

                                      Jared is correct about my intent 🙂

                                      1 Reply Last reply Reply Quote 0
                                      • JaredBuschJ
                                        JaredBusch @Dashrender
                                        last edited by

                                        @Dashrender said in Nextcloud Backup System Idea:

                                        @JaredBusch said in Nextcloud Backup System Idea:

                                        @DustinB3403 and @travisdh1 are both missing the fucking point that while this may be a single 1u server in colo the point is to be a full lab design.

                                        He absolutely should have a “backup” VM as this is what exists in reality.

                                        It is replicating the real world on site copy.

                                        This was my assumption as well - he's trying to mimic real life as best he can.

                                        It isn’t even an assumption. It was clearly stated.

                                        1 Reply Last reply Reply Quote 0
                                        • DustinB3403D
                                          DustinB3403 @JaredBusch
                                          last edited by

                                          @JaredBusch said in Nextcloud Backup System Idea:

                                          @brandon220 said in Nextcloud Backup System Idea:

                                          As important as backups are - I'm really surprised that NC has not integrated them into the software.
                                          This thread is helpful as I was not aware of Restic. I normally make exports of the VM for NC backups.

                                          I am surprised that they have not partnered with some provider.

                                          I wonder is someone could write a backup app that would backup the DB and up it to Backblaze

                                          So mimic real fucking life and hostthe VM on a remote platform like I stated.

                                          See my previous post for the details as to what I said.

                                          Also happy new years

                                          JaredBuschJ 1 Reply Last reply Reply Quote 0
                                          • scottalanmillerS
                                            scottalanmiller @EddieJennings
                                            last edited by

                                            @EddieJennings said in Nextcloud Backup System Idea:

                                            @travisdh1 said in Backup System Idea:

                                            @EddieJennings said in Backup System Idea:

                                            @DustinB3403 said in Backup System Idea:

                                            To ask and to be that guy;

                                            Why does it sound as if NextCloud is going to be installed to the bare metal with the potential for a separate "Backup VM"?

                                            As for the backup solution, you can use tools like Restic, Duplicati, UrBackup or really anything you want. Have that tool backup to a local storage media and then copy those to a cloud provider.

                                            NextCloud isn't going to be installed on bare metal. I could just attach another qcow2 disk to the VM, mount it somewhere, and use that as the backup target.

                                            The idea of the Backup VM is emulating something like what I might find in a production environment using something like Veeam, where you have a dedicated server (VM) that runs the backup software and is a target for the backed up data. Of course, this is overkill for what I'm doing (just backing up my NextCloud instance).

                                            Why not send the backup to either Backblaze B2 or Wasabi? If you want practice doing backups, might as well do it right. My B2 is costing me ~$1.25/month

                                            So skip having a 3rd copy of the data (live, copy on aforementioned Backup VM, copy on Backblaze storage or some other provider)?

                                            Number of copies is never really a factor. It's the resulting durability that matters.

                                            1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 3
                                            • 2 / 3
                                            • First post
                                              Last post