Announcement

Collapse
No announcement yet.

vb_backup.sh

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • vb_backup.sh

    How do I use this item?

    I'd like to back up the d/b from my 3.6.8 so I can upgrade to 3.7RC1, keeping the back up just in case.
    VB 5.4.1 - PHP 7..2.4 - MySQL 5.5.56
    No Addons - none at all.

  • #2
    Does you host let you have access to SSH

    If you have files (attachments) in a file system, then you need to backup those as well.

    Comment


    • #3
      In the 'do not upload' directory, there's a file called 'vb_backup.sh' and according to the documentation, it's intended to do the back up for you. I've done a back up using SSH previously, but I just wondered how to use this file (as it isn't documented 'how to' use it, only that 'it does this').
      VB 5.4.1 - PHP 7..2.4 - MySQL 5.5.56
      No Addons - none at all.

      Comment


      • #4
        Just edit the path at the top of the script and upload it and once its chmod to +755 you can just run ./vb_backup from then on to get a backup.
        Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
        Change CKEditor Colors to Match Style (for 4.1.4 and above)

        Steve Machol Photography


        Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


        Comment


        • #5
          Originally posted by Steve Machol View Post
          Just edit the path at the top of the script and upload it and once its chmod to +755 you can just run ./vb_backup from then on to get a backup.
          Cracking info Steve... thanks

          I'd already figured the change of path, but wasn't sure if i could run it as a webpage or had to invoke it from ssh or suchlike.

          Can you give me an idea on how to run it - is it via ssh?
          Do I put it under my httpdocs folder or somewhere else?

          Sorry for the basic questions, but i'm still lost it seems.
          Last edited by karlm; Sun 30 Mar '08, 8:50am.
          VB 5.4.1 - PHP 7..2.4 - MySQL 5.5.56
          No Addons - none at all.

          Comment


          • #6
            Try clicking on this image link.


            I still can not figure that method of backup, as I use SSh and or the Cron Job
            , Auto backups that my host provides.

            Comment


            • #7
              The vb backup shell script is for .. shell only. Not for web page runnin, etc.

              nano -w vb_backup.sh
              change the vars, save it

              chmod 755 vb_backup.sh

              and run it

              ./vb_backup.sh backup

              Comment


              • #8
                OK thanks for the tips... sorry, but I'm still not getting this.

                I have loaded into httpdocs (public) and chmod to 755.

                When I run it, using:
                Code:
                ./vb_backup.sh backup
                I'm presented with this response:

                Code:
                -bash: ./vb_backup.sh: /bin/bash^M: bad interpreter: No such file or directory
                VB 5.4.1 - PHP 7..2.4 - MySQL 5.5.56
                No Addons - none at all.

                Comment


                • #9
                  That means you are not running this from the directory that contains that file.
                  Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
                  Change CKEditor Colors to Match Style (for 4.1.4 and above)

                  Steve Machol Photography


                  Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


                  Comment


                  • #10
                    use locate or whereis in the shell to find "bash"

                    whereis bash
                    or
                    locate bash

                    and find the binary, and edit the .sh file to point to that path/bash

                    Comment


                    • #11
                      Due to not knowing where else to place the file, I have it located in my httpdocs directory... When I get into ssh, I use 'cd httpdocs' to get to the directory and the 'ls' to list them. The vb_backup file is listed in a green colour while other files have different colours. It appears to be there.

                      Using the command 'whereis', I get this result:

                      Code:
                      -bash-3.1$ whereis bash
                      bash: /bin/bash /usr/share/man/man1/bash.1.gz
                      This is my current settings:
                      Code:
                      # Please change this variable to the path to your config.php
                      path_to_config="/my/path/to/config/mysite.com/httpdocs/includes/config.php"
                      
                      # If you need the full path to the mysqldump binaries or gzip binaries set below
                      mysqldumpcmd=mysqldump
                      gzipcmd=gzip
                      
                      ################# No Editing below this point #################
                      I have already edited the 'path to config' and the only other one I see to edit is the gzipcmd - is that what I replace the results of the 'whereis'?
                      VB 5.4.1 - PHP 7..2.4 - MySQL 5.5.56
                      No Addons - none at all.

                      Comment


                      • #12
                        If you have access to the shell anyway, why not just your the straight command outlined here?

                        Backup:
                        http://www.vbulletin.com/docs/html/m...nce_ssh_backup

                        Restore:
                        http://www.vbulletin.com/docs/html/m...ce_ssh_restore
                        Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
                        Change CKEditor Colors to Match Style (for 4.1.4 and above)

                        Steve Machol Photography


                        Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


                        Comment


                        • #13
                          Because I was under the impression that this script would save manually doing it each time, making life a tad easier.

                          I'm not sure I understand correctly what this is for... or how it is used.

                          It seems to use it, one must have access to shell - in which case they can just do it manually. What is the point of this?
                          VB 5.4.1 - PHP 7..2.4 - MySQL 5.5.56
                          No Addons - none at all.

                          Comment


                          • #14
                            It's there for people who want to use it. I suspect some will use it with cronjobs, although the mysqldump command line does essentially the same thing.
                            Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
                            Change CKEditor Colors to Match Style (for 4.1.4 and above)

                            Steve Machol Photography


                            Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


                            Comment


                            • #15
                              at the top of the .sh file you will see
                              Code:
                              #!/bin/bash
                              ####################################################################
                              # vBulletin 3.6.8 Patch Level 2
                              You can see #!/bin/bash

                              If you use whereis and it says it's in /bin/bash
                              then the line #!/bin/bash is correct.

                              after chmod 755 vb_backup.sh
                              and you do ./vb_backup_sh
                              it should not say bad interp.

                              try loading bash manually by typing

                              /bin/bash

                              and you should get a prompt back and not an error
                              type exit to quit it.
                              and you get back in your first shell bash

                              I see you set:
                              Code:
                              # Please change this variable to the path to your config.php
                              path_to_config="/my/path/to/config/mysite.com/httpdocs/includes/config.php"
                              go into your httpdocs dir, and then into your includes folder
                              cd
                              cd httpdocs/includes
                              and type:

                              pwd

                              the result from pwd (example: /home/userx/httpdocs/includes/

                              is what you set between the " quotes "

                              of course you edit out /path/to/mysite

                              Comment

                              widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                              Working...
                              X