Eğer işletme ms sql kullanıyorsa yedekleme için: yedekscript.sql diye bir dosya yarat(sqlyedek.sql) ve içine
Kullanılan araçlar:
windows task manager
notepad
özeillkler:
mssql yedek alma
mail yollama
günlük yedek alma
--------------------------------------------------------------------------
MSSQL KOMUT SATIRINDA YEDEKLEMEK İÇİN
BACKUP DATABASE [VT_2008] TO DISK = N'f:\zbasic\yedek\1\VT_2008.bak' WITH NOFORMAT, NOINIT, NAME = N'VT_2008-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10
GO
Kullanılan araçlar:
windows task manager
notepad
özeillkler:
mssql yedek alma
mail yollama
günlük yedek alma
--------------------------------------------------------------------------
MSSQL KOMUT SATIRINDA YEDEKLEMEK İÇİN
BACKUP DATABASE [VT_2008] TO DISK = N'f:\zbasic\yedek\1\VT_2008.bak' WITH NOFORMAT, NOINIT, NAME = N'VT_2008-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10
GO
kaydettikten sonra batch dosyası yarat ve içine
sqlcmd -S \SQLEXPRESS -i "f:\zbasic\yedek\sqlyedek.sql"
---------------------------------------------------------------------------------
KOMUT SATIRINDAN MAIL YOLLAMAK İÇİN ONCE SM.VBS dosyası yarat gmail
' VBScript to Send Email Notification
' Author: https://helloacm.com
' Usage: cscript.exe sendemail.vbs email subject text
' 23/Dec/2014
Sub SendEmail(ToAddress, Subject, Text)
Dim iMsg
Dim iConf
Dim Flds
Set iMsg = CreateObject("CDO.Message")
Set iConf = CreateObject("CDO.Configuration")
iConf.Load -1
Set Flds = iConf.Fields
With Flds
.Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True
.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "sender@gmail.com"
.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "senderpass"
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.gmail.com" 'smtp mail server
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 465 'stmp server
.Update
End With
With iMsg
Set .Configuration = iConf
.To = ToAddress
.From = "sender@gmail.com"
.Subject = Subject
.TextBody = Text
.AddAttachment "C:\yedek.txt"
.Send
End With
Set iMsg = Nothing
Set iConf = Nothing
End Sub
If WScript.Arguments.Count <> 3 Then
WScript.Echo "Usage: cscript.exe " & WScript.ScriptFullName & " email subject text"
Else
SendEmail WScript.Arguments(0), WScript.Arguments(1), WScript.Arguments(2)
End If
kaydettikten sonra batch dosyası yarat ve
cscript f:\zbasic\yedek\sm.vbs receiver@gmail.com YDK YDK
-----------------------------------------------------------------------------------------
KOMUT SATIRINDAN WINRARLA SIKIŞTIRMA PARÇALI OLARAK
"c:\program files\winrar\rar.exe" a -r -v15000k "C:\Program Files\Internet Explorer\yedek" "C:\Program Files\Internet Explorer\yedek.exe"
PARÇASIZ OLARAK
"c:\program files\winrar\rar.exe" a -r "C:\Program Files\Internet Explorer\yedek" "C:\Program Files\Internet Explorer\yedek.exe"