If you just want a Transact-SQL script to do the backup , you can use something like:
USE SeuBanco;
GO
BACKUP DATABASE SeuBanco
TO DISK = 'Z:\SQLServerBackups\SeuBanco.Bak'
WITH FORMAT,
MEDIANAME = 'Z_SQLServerBackups',
NAME = 'Backup Full do SeuBanco';
GO
The basic syntax is:
BACKUP DATABASE nomeDoBanco
TO lugarOndeSeraGravado
See the syntax for creating here and if you want to generate differential backups from a full backup, you can use the DIFFERENTIAL .
But it is recommended that you schedule a job to automate this using SQL Server Agent .
Right-click Jobs and then New Job ...
>
OntheGeneraltab,inName,typethenameyoufindconvenientforyourjob.
OntheStepstab,clicktheNewbuttontocreatethestepsofyourjob.
Enter a name for the step, type backup , script and configure the schedule.
Formoredetails,takealookat here .