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

    Bookstack Backup to S3

    IT Discussion
    bookstack mariadb mysqldump mysql script amazon s3
    5
    10
    1.6k
    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.
    • dbeatoD
      dbeato
      last edited by dbeato

      Since I have been using bookstack more and more and while I do VM backups, I just wanted to setup backup externally to S3.
      The UI or system doesn't have a way to do database backups from the GUI or schedule it. So I created my MariaDB backup to S3 as below and wanted to share and open to change as well.

      find /sql0-backups/ -type f -iname '*.sql' -mtime +1 -delete
      USER=usernanme
      PASS="password"
      DB=bookstack
      DATE=$(date +%Y-%m-%d-%H-%M)
      mysqldump -u $USER -p$PASS $DB > /sql-backups/backup-$DATE.sql
      aws s3 cp /sql-backups s3://bucket-name/ --endpoint-url=https://s3.wasabisys.com --recursive
      
      Alex JonesA 1 Reply Last reply Reply Quote 6
      • Alex JonesA
        Alex Jones @dbeato
        last edited by

        Thanks!

        1 Reply Last reply Reply Quote -2
        • dafyreD
          dafyre
          last edited by dafyre

          Set that up in cron to run it on a schedule.

          dbeatoD 1 Reply Last reply Reply Quote 0
          • dbeatoD
            dbeato @dafyre
            last edited by

            @dafyre said in Bookstack Backup to S3:

            Set that up in cron to run it on a schedule.

            yes, I have that going.

            1 Reply Last reply Reply Quote 1
            • wrx7mW
              wrx7m
              last edited by

              @dbeato Are you running bookstack in AWS?

              dbeatoD 1 Reply Last reply Reply Quote 0
              • dbeatoD
                dbeato @wrx7m
                last edited by

                @wrx7m said in Bookstack Backup to S3:

                @dbeato Are you running bookstack in AWS?

                Not at the moment. I am just backing up to S3.

                wrx7mW 1 Reply Last reply Reply Quote 0
                • wrx7mW
                  wrx7m @dbeato
                  last edited by

                  @dbeato said in Bookstack Backup to S3:

                  @wrx7m said in Bookstack Backup to S3:

                  @dbeato Are you running bookstack in AWS?

                  Not at the moment. I am just backing up to S3.

                  Look at Wasabi for S3 compatible object storage. Significantly cheaper.

                  scottalanmillerS dbeatoD 2 Replies Last reply Reply Quote 2
                  • scottalanmillerS
                    scottalanmiller @wrx7m
                    last edited by

                    @wrx7m said in Bookstack Backup to S3:

                    @dbeato said in Bookstack Backup to S3:

                    @wrx7m said in Bookstack Backup to S3:

                    @dbeato Are you running bookstack in AWS?

                    Not at the moment. I am just backing up to S3.

                    Look at Wasabi for S3 compatible object storage. Significantly cheaper.

                    Yup, can't think of any reason to use S3 unless you are hosted on AWS and aren't using it for backup but for production storage. And even then, not the majority of the time. S3 is too expensive and doesn't really offer anything except locality that is of any specific value. B2 and Wasabi beat it a lot.

                    dbeatoD 1 Reply Last reply Reply Quote 3
                    • dbeatoD
                      dbeato @wrx7m
                      last edited by

                      @wrx7m said in Bookstack Backup to S3:

                      @dbeato said in Bookstack Backup to S3:

                      @wrx7m said in Bookstack Backup to S3:

                      @dbeato Are you running bookstack in AWS?

                      Not at the moment. I am just backing up to S3.

                      Look at Wasabi for S3 compatible object storage. Significantly cheaper.

                      Sorry, If you see my script. It is pointing to Wasabi so yes I am using that instead.

                      1 Reply Last reply Reply Quote 0
                      • dbeatoD
                        dbeato @scottalanmiller
                        last edited by

                        @scottalanmiller said in Bookstack Backup to S3:

                        @wrx7m said in Bookstack Backup to S3:

                        @dbeato said in Bookstack Backup to S3:

                        @wrx7m said in Bookstack Backup to S3:

                        @dbeato Are you running bookstack in AWS?

                        Not at the moment. I am just backing up to S3.

                        Look at Wasabi for S3 compatible object storage. Significantly cheaper.

                        Yup, can't think of any reason to use S3 unless you are hosted on AWS and aren't using it for backup but for production storage. And even then, not the majority of the time. S3 is too expensive and doesn't really offer anything except locality that is of any specific value. B2 and Wasabi beat it a lot.

                        Sorry, I posted this as S3 but I should change it to Wasabi. It is the same Idea for both.

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