SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Guru
    Join Date
    Apr 2001
    Location
    BC, Canada
    Posts
    630
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    backing up multiple db's

    I have a few domains with over 20 db's each, some of even go up to 50.

    Decided it was time to start backing them up. I know it's possible to back them up, one at a time using mysqldump.. or even phpMyAdmin, but is there a faster way to back up all the databases?... Can I just download the db files somewhere??


    thanx

  2. #2
    Making a better wheel silver trophy DR_LaRRY_PEpPeR's Avatar
    Join Date
    Jul 2001
    Location
    Missouri
    Posts
    3,428
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    if this is your server and you have access to all the databases, you can use the -A or --all-databases option to backup all DBs:

    Code:
    mysqldump --opt -A > /path/to/dump/file.sql
    if you're on a shared server or something and don't have access to all DBs you'll get an error when mysqldump attempts to access the other DBs. the --force option may get around that problem, though, and just dump the DBs that you have access to. i'm not sure though.

    Code:
    mysqldump --opt --force -A > /path/to/dump/file.sql
    or, finally, you can name all of the databases manually that you want to dump, which is faster than seperately. use the --databases option

    Code:
    mysqldump --opt --databases db1 db2 db3 db4 etc > /path/to/dump/file.sql
    of course, in all examples, specify your login with -uusername -ppassword if necessary.
    Last edited by DR_LaRRY_PEpPeR; Jan 26, 2002 at 21:28.
    - Matt ** Ignore old signature for now... **
    Dr.BB - Highly optimized to be 2-3x faster than the "Big 3."
    "Do not enclose numeric values in quotes -- that is very non-standard and will only work on MySQL." - MattR


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •