Announcement

Collapse
No announcement yet.

Backup database

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

  • Backup database

    I only have access directly to the server via ftp how do I backup the forums??

    If I choose Save data to file on server: would I be able to download this onto out computers via ftp just incase anything happens to the servers?

    any help would be very mcuh appreciated.

  • #2
    Yup, you can do that.

    You'll probably want to do importation via telnet though. (I'm sure you could get your host to do that if you don't have permission)

    Comment


    • #3
      Cheers Ed

      You wouldn't happen to know of any SSH software that is easy to use and free (if poss, why I get the hang of how to use it).

      Comment


      • #4
        Personally, I use Putty, which handles Telnet and SSH really nicely. I'm not sure of the official URL for it, but I get the latest versions from one of my hosts http://downloads.positive-internet.com/

        Comment


        • #5
          Of course... Putty is a client... did you mean an SSH host?

          Comment


          • #6
            Thanks Kier I'll give it a go, we have just moved to a dedicated server and have been told we can access the admin etc via SSH.

            Comment


            • #7
              To back up database, make a .cgi file, and put this inside:

              Code:
              #!/usr/bin/perl
              
              print "Content-type: text/html\n\n";
              print `mysqldump --user= [username] --password=[password] [databasename] > databasename.sql`;
              Then upload it to your CGI directory (ie. cgi-bin). Chmod to 755, and then access it via HTTP. Then go back to your FTP, refresh your cgi-bin, and a file will be there. There you go, your database it backed up. All you do is download it, then reupload for your new server.

              Comment


              • #8
                Not knowing much about CGI/Perl, I don't know whether this is true, but as you know in PHP there is a default 30 second time that scripts have to finish in, which is what is causing problems for those using phpMyAdmin or the CP backup utility when backing up their database. Would this script suffer from a similar limit?

                Comment


                • #9
                  hehe.. kiew, you use the same host i used to positive internet... tasty
                  http://www.e-tones.co.uk - The best site on the net for mobile phones.

                  Comment


                  • #10
                    Yeah, that's where I host ap3d.com, although my other site (3dfrontier.com) is on my own dedicated server.

                    Comment


                    • #11
                      Kier or anyone,

                      I have downloaded Putty, and have managed to log-in to the admin, but all it does is bring up a black screen how from this screen do I back up the forums???

                      any help appreciated I want to install full Version 2 tonight but want to do a backup first.

                      Comment


                      • #12
                        okay, the black screen you have should look a bit like a dos prompt, right?

                        if so, then do this:

                        Code:
                        cd /usr/local/mysql/bin
                        mysqldump -uUSERNAME -p DATABASE /path/to/dumpfile.sql
                        Where USERNAME is your mysql username, and you specify the path to dumpfile.sql.

                        Comment


                        • #13
                          Code:
                          cd /usr/local/mysql/bin
                          mysqldump -uUSERNAME -p DATABASE /path/to/dumpfile.sql
                          Thanks for the quick reply Kier, (bit of a divy me ) :

                          Is all I have to change is the username and the path, or do I also have to change the first line?

                          Comment


                          • #14
                            More than likely you won't need to change it...

                            You'll only need to change the first line if mysql is installed elsewhere (not often the case)

                            Comment


                            • #15
                              Hi Kier,

                              It returned an error of

                              mysqldump: not found

                              Comment

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