backup large number of SQL databses

52 views
Skip to first unread message

damjan jancic

unread,
Feb 26, 2020, 4:51:34 PM2/26/20
to bareos-users


Hello,


We need to backup SQL server with more than 600 databases.

according to bareos documentation for each database instance you need to define a exclusive backup job and fileset.

Are there any options other than creating more than 600 backup jobs and filesets?


Kind regards,
Damjan
Message has been deleted

Brock Palen

unread,
Feb 26, 2020, 5:05:06 PM2/26/20
to damjan jancic, bareos-users
Is this one database instance with multiple ‘databases’ eg; mysql> use database1; use database2; etc?
If it’s all on once host you can connect to the database server with multiple databases your good. You would need one entry per host not database.

If it is you are able to use the plugins here:
https://docs.bareos.org/Appendix/Howtos.html#backup-of-a-mysql-database

I use the python plugin, it’s straggly slow but I like it better than my old way. In my case I use a job like:

# http://doc.bareos.org/master/html/bareos-manual-main-reference.html#x1-613000H.2.3
FileSet {
Name = "mlds-mysql"
Include {
Options {
signature = MD5
compression = GZIP6
}
Plugin = "python:module_path=/usr/lib/bareos/plugins:module_name=bareos-fd-mysql:mysqlhost=mlds:mysqluser=root:mysqlpassword=<password>"
}
}

By not passing in a database name it just backups them all.

You can also use scripts to just invoke the dump command of your choice and then make a fileset that backups the dumped files.
https://docs.bareos.org/Configuration/Director.html#config-Dir_Job_RunScript

The included bareos backup catalog job has an example of how to call an external script and backup the dump for exactly that.

>
>
> Kind regards,
> Damjan
>
> --
> You received this message because you are subscribed to the Google Groups "bareos-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to bareos-users...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/bareos-users/c526ec73-60bc-498f-a66a-c1e83a31f9eb%40googlegroups.com.

damjan jancic

unread,
Feb 28, 2020, 7:49:42 PM2/28/20
to bareos-users
Dear Brock,


It is the backup of MS SQL server databases(not mysql).
When I remove database name from the file set I got an error:

"Fatal error: An object or column name is missing or empty. For SELECT INTO statements, verify each column has a name. For other statements, look for empty alias names. Aliases defined as "" or [] are not allowed. Change the alias to a valid name"

When I remove all part databases=<$databsename> I got an error:

"Fatal error: An object or column name is missing or empty. For SELECT INTO statements, verify each column has a name. For other statements, look for empty alias names. Aliases defined as "" or [] are not allowed. Change the alias to a valid name."

File set:

Fileset {
    Name = "testowt-sql-fileset"
    Enable VSS = No
    Include {
        Options {
           Signature = MD5
           compression = gzip
        }
        Plugin = "mssqlvdi:instance=default:database=testowt:username=btest:password=**********"
    }
}
Kind regards,
Damjan
> To unsubscribe from this group and stop receiving emails from it, send an email to bareos...@googlegroups.com.

Brock Palen

unread,
Mar 1, 2020, 9:56:38 PM3/1/20
to damjan jancic, bareos-users
Sorry don’t have any mssql experience,

That said it looks like the mssqlvdi does require a database and thus a fileset per database. The documentation has:

To use the plugin you need to configure it in the fileset as a plugin resource. For each database instance you need to define a exclusive backup job and fileset.

And it does not say if the database entry is optional.

Sorry maybe someone else knows more.


You can still use scripts to wrap CLI tools to manually dump and backup the dump as a fallback.

Good luck!


Brock Palen
1 (989) 277-6075
bro...@mlds-networks.com
www.mlds-networks.com
Websites, Linux, Hosting, Joomla, Consulting
> To unsubscribe from this group and stop receiving emails from it, send an email to bareos-users...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/bareos-users/7cf137fc-cd21-4e01-98ae-bfbe5d1b8e9c%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages