9 lines
355 B
Groovy
9 lines
355 B
Groovy
|
|
def call(Map config=[:]) {
|
|
def srv = config.srv
|
|
def db = config.db
|
|
def file = config.file
|
|
def cmd = 'sqlcmd -S ' + srv + ' -E -Q "BACKUP DATABASE [' + db + "] TO DISK = N'" + file + "' WITH NOFORMAT, INIT, NAME = N'" +
|
|
db + "-Full Database Backup'" + ', SKIP, NOREWIND, NOUNLOAD, COMPRESSION, STATS = 10"'
|
|
cmd( script: cmd )
|
|
} |