SQL Express – Backup Plan

SQL express doesn’t have the luxury of SQL maintenance plans, but you can still write a SQL script to dump a database to a particular location and run it via task scheduler on a daily basis.

Create SQL query and save it to a particular location… (NightlyBackup.sql)

DECLARE @pathName NVARCHAR(512)

SET @pathName = ‘D:\SQL Backup\database_‘ + Convert(varchar(8), GETDATE(), 112) + ‘.bak’

BACKUP DATABASE [database] TO DISK = @pathName WITH NOFORMAT, NOINIT, NAME = N’db_backup’, SKIP, NOREWIND, NOUNLOAD, STATS = 10

Create cmd / bat and save to similar location to above… (Backup DB to disk.cmd)

sqlcmd -S servername\INSTANCENAME -U sqluser -P sqluserpassword -i “NightlyBackup.sql”

forfiles /p “C:\SQLBackupLocation” /m *.bak /s /d -2 /c “cmd /c del @file : date >= 7 days >NUL”

Create windows task schedule event to run above at 5:30pm everyday. 

install crashplan on solaris

http://support.crashplan.com/doku.php/getting_started/installing_crashplan

Move the downloaded tar.gz file into /var/spool/pkg/

mv CrashPlan_2010-03-08_Solaris.tar.gz /var/spool/pkg/

Unpack the archive.

tar -xzvf CrashPlan_2010-03-08_Solaris.tar.gz

Install the CrashPlan package:

sudo /usr/sbin/pkgadd

Start CrashPlan Engine:

sudo /opt/sfw/crashplan/bin/CrashPlanEngine start

Start CrashPlan Desktop:

sudo /opt/sfw/crashplan/bin/CrashPlanDesktop

To enable CrashPlan PRO as a service (as root):

svccfg import /opt/sfw/crashplan/bin/crashplan.xml

svcadm enable crashplan

check that the service has come online proplery (then load client)

svcs -a | grep crashplan

online         21:18:43 svc:/crashplan:default