Skip to content
Snippets Groups Projects
example.mysql 2.13 KiB
Newer Older
  • Learn to ignore specific revisions
  • ## backupninja mysql config file ##
    
    elijah's avatar
    elijah committed
    
    
    dbhost      = localhost
    databases   = all
    backupdir   = /var/backups/mysql
    hotcopy     = yes
    sqldump     = no
    compress    = yes
    
    ## authentication ##
    
    configfile = /etc/mysql/debian.cnf
    
    # or...
    # dbusername  = <dbuser>
    # dbpassword  = <dbpassword>
    
    # or...
    # user = root
    
    ## notes ##
    
    # configfile = < path/to/file > (default = /etc/mysql/debian.cnf)
    # The config file is passed to mysql with --defaults-file.
    # On debian, this default will allow backupninja to make backups
    # of mysql without configuring any additional options. 
    # (this option is not compatible with "user" or "dbusername").
    
    elijah's avatar
    elijah committed
    #
    
    # user = <user> (default = root)
    
    elijah's avatar
    elijah committed
    # Run mysql commands as 'user'. A valid .my.cnf must exist with a 
    # database username and password in the user's home directory.
    
    # (this option is not compatible with "configfile" or "dbusername").
    
    elijah's avatar
    elijah committed
    #
    
    # dbusername = <dbuser> (no default)
    
    elijah's avatar
    elijah committed
    # The user must have access to the databases specified later.
    
    # (this option is not compatible with "configfile" or "user").
    
    elijah's avatar
    elijah committed
    #
    
    # dbpassword = <dbpass> (no default)
    # The password used with dbusername. this password will NOT be passed 
    # on the command line and is not readable using "ps aux".
    
    elijah's avatar
    elijah committed
    #
    
    # dbhost = <host> (default = localhost)
    
    elijah's avatar
    elijah committed
    # only localhost works right now.
    #
    
    # databases = < all | db1 db2 db3 > (default = all)
    
    elijah's avatar
    elijah committed
    # which databases to backup. should either be the word 'all' or a 
    
    # space separated list of database names.
    
    elijah's avatar
    elijah committed
    #
    
    # backupdir = < path/to/destination > (default = /var/backups/mysql)
    
    elijah's avatar
    elijah committed
    # where to dump the backups. hotcopy backups will be in a subdirectory 'hotcopy' and
    # sqldump backups will be in a subdirectory 'sqldump'
    #
    
    # hotcopy = < yes | no > (default = yes)
    
    elijah's avatar
    elijah committed
    # make a backup of the actual database binary files using mysqlhotcopy.
    #
    
    # sqldump = < yes | no > (default = no)
    
    elijah's avatar
    elijah committed
    # make a backup using mysqldump. this creates text files with sql commands
    # sufficient to recontruct the database.
    #
    
    # compress = < yes | no > (default = yes)
    
    elijah's avatar
    elijah committed
    # if yes, compress the sqldump output. 
    #
    
    # vsname = <vserver> (no default)
    
    micah's avatar
    micah committed
    # what vserver to operate on, only used if vserver = yes in /etc/backupninja.conf
    # if you do not specify a vsname the host will be operated on
    
    elijah's avatar
    elijah committed