clarify how the nodata option should be specified in the config file for mysql
[matthijs/upstream/backupninja.git] / examples / example.mysql
1 ### backupninja mysql config file ###
2
3 databases   = all
4 backupdir   = /var/backups/mysql
5 hotcopy     = no
6 sqldump     = yes
7 compress    = yes
8
9 ### authentication ###
10
11 # three authentication methods:
12 #
13 # 1. setting the user, so that /home/user/.my.cnf is used.
14 # user = some-unix-user
15 #
16 # 2. specifying the mysql dbuser and dbpassword,
17 #    which generates a temporary .my.cnf in /root/.my.cnf
18 # dbusername  = <some-mysql-user>
19 # dbpassword  = <password>
20 #
21 # 3. specify which config file to use with configfile
22 #    (this option does not work with hotcopy)
23 # configfile = /etc/mysql/debian.cnf
24 #
25 # if user and dbusername are not specified, the default is to use
26 # /etc/mysql/debian.cnf for configfile.
27
28 ### all options ###
29
30 # configfile = < path/to/file > (default = /etc/mysql/debian.cnf)
31 # The config file is passed to mysql with --defaults-file.
32 # On debian, this default will allow backupninja to make backups
33 # of mysql without configuring any additional options. 
34 # (this option is not compatible with "user" or "dbusername").
35 #
36 # user = <user> (default = root)
37 # Run mysql commands as 'user'. A valid .my.cnf must exist with a 
38 # database username and password in the user's home directory.
39 # (this option is not compatible with "configfile" or "dbusername").
40 #
41 # dbusername = <dbuser> (no default)
42 # The user must have access to the databases specified later.
43 # (this option is not compatible with "configfile" or "user").
44 #
45 # dbpassword = <dbpass> (no default)
46 # The password used with dbusername. this password will NOT be passed 
47 # on the command line and is not readable using "ps aux".
48 #
49 # dbhost = <host> (default = localhost)
50 # only localhost works right now.
51 #
52 # databases = < all | db1 db2 db3 > (default = all)
53 # which databases to backup. should either be the word 'all' or a 
54 # space separated list of database names.
55 #
56 # nodata = < db.table1 db.table2 db.table3 > (no default)
57 # only dump the structure for the database tables listed here, this means
58 # no data contained in these tables will be dumped. This is very useful
59 # to backup databases that have tables with large amounts of cache data that
60 # isn't necessary to backup, but you still need the structure to exist
61 # on a restore. You *must* specify the table as part of a database, such
62 # as "drupal.cache", where the database name is "drupal" and the table that
63 # you do not want to dump the data for is called "cache". 
64 #
65 # backupdir = < path/to/destination > (default = /var/backups/mysql)
66 # where to dump the backups. hotcopy backups will be in a subdirectory 
67 # 'hotcopy' and sqldump backups will be in a subdirectory 'sqldump'
68 #
69 # hotcopy = < yes | no > (default = no)
70 # make a backup of the actual database binary files using mysqlhotcopy.
71 #
72 # sqldump = < yes | no > (default = no)
73 # make a backup using mysqldump. this creates text files with sql commands
74 # sufficient to recontruct the database.
75 #
76 # compress = < yes | no > (default = yes)
77 # if yes, compress the sqldump output. 
78 #
79 # vsname = <vserver> (no default)
80 # what vserver to operate on (only used if vserver = yes 
81 # in /etc/backupninja.conf), if you do not specify a vsname the 
82 # host will be operated on
83
84 # NB: databases = all doesn't seem to work with hotcopy = yes 
85 # when vsname is specified, I would like to know how to fix this.