Home Page link  

Auto Backup

 

Point-Of-Sale Software - - MS Point Of Sale software discussed here 

get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content  add this group's latest topics to your Google content  YahooMyWeb Yahoo!  Google Google  Windows Live Favorites Windows Live  del.icio.us del.icio.us  digg digg  Add to Netscape Netscape
Subject Author Date
Auto Backup Steve 10-22-2008
Posted by Haik on October 22, 2008, 7:19 pm
Please log in for more thread options
This script works perfectly, I have been using it for years.

@For /F "tokens=2,3,4 delims=/ " %%A in ('Date /t') do @(
Set Month=%%A
Set Day=%%B
Set Year=%%C
)

osql -U sa -P SQLPASSWORD -S NETBIOSNAME -Q "BACKUP DATABASE [DBNAME] TO
DISK = 'C:Path%Day%-%Month%-%Year%.BCK'"


This is backup the DB and also label it with the date it was backed up on.
Very useful.
"Steve" wrote:

> Does anyone have a .bat script for Microsoft RMS 2.0 for auto backup? I've
> tried the following, but did not have any luck..
>
> osql -U sa -P password -S servername -Q "BACKUP DATABASE
> databasename TO DISK = 'c:database.bck'WITH FORMAT, STATS"
>
> Any help will be greatly appreciated.

Posted by Steve on October 24, 2008, 12:27 pm
Please log in for more thread options
Thanks Haik! I will give that a try.

"Haik" wrote:

> This script works perfectly, I have been using it for years.
>
> @For /F "tokens=2,3,4 delims=/ " %%A in ('Date /t') do @(
> Set Month=%%A
> Set Day=%%B
> Set Year=%%C
> )
>
> osql -U sa -P SQLPASSWORD -S NETBIOSNAME -Q "BACKUP DATABASE [DBNAME] TO
> DISK = 'C:Path%Day%-%Month%-%Year%.BCK'"
>
>
> This is backup the DB and also label it with the date it was backed up on.
> Very useful.
> "Steve" wrote:
>
> > Does anyone have a .bat script for Microsoft RMS 2.0 for auto backup? I've
> > tried the following, but did not have any luck..
> >
> > osql -U sa -P password -S servername -Q "BACKUP DATABASE
> > databasename TO DISK = 'c:database.bck'WITH FORMAT, STATS"
> >
> > Any help will be greatly appreciated.

Posted by Surfzoid on November 3, 2008, 5:57 am
Please log in for more thread options

I know it is a details, but like this it could more easy and flexible :
@For /F "tokens=2,3,4 delims=/ " %%A in ('Date /t') do @(
Set Month=%%A
Set Day=%%B
Set Year=%%C
)
set BaseName=MyBase
set BckDestDir=c:toMyPath

osql -U sa -P SQLPASSWORD -S NETBIOSNAME -Q "BACKUP DATABASE [%BaseName%] TO
DISK = '%BckDestDir%%Day%-%Month%-%Year%.BCK'"

"Steve" wrote:

> Thanks Haik! I will give that a try.
>
> "Haik" wrote:
>
> > This script works perfectly, I have been using it for years.
> >
> > @For /F "tokens=2,3,4 delims=/ " %%A in ('Date /t') do @(
> > Set Month=%%A
> > Set Day=%%B
> > Set Year=%%C
> > )
> >
> > osql -U sa -P SQLPASSWORD -S NETBIOSNAME -Q "BACKUP DATABASE [DBNAME] TO
> > DISK = 'C:Path%Day%-%Month%-%Year%.BCK'"
> >
> >
> > This is backup the DB and also label it with the date it was backed up on.
> > Very useful.
> > "Steve" wrote:
> >
> > > Does anyone have a .bat script for Microsoft RMS 2.0 for auto backup? I've
> > > tried the following, but did not have any luck..
> > >
> > > osql -U sa -P password -S servername -Q "BACKUP DATABASE
> > > databasename TO DISK = 'c:database.bck'WITH FORMAT, STATS"
> > >
> > > Any help will be greatly appreciated.

Similar ThreadsPosted
DB Backup with date & timestamp in the backup name March 15, 2006, 9:16 pm
Why is SQL Server Backup 4x Larger than RMS Backup? August 23, 2009, 12:45 am
Auto Add-on? June 26, 2008, 2:39 pm
auto batch with edc July 8, 2005, 12:52 pm
Auto fill July 21, 2005, 3:27 pm
Auto PO re-Order Help March 20, 2006, 2:07 pm
Auto Settle of EDC November 15, 2006, 3:59 am
Auto Save November 16, 2006, 6:31 pm
Auto Save December 11, 2006, 1:55 am
AUTO SALES REP March 22, 2007, 12:39 pm

Contact Us | Privacy Policy
This site is not affiliated with Intuit - makers of Quickbooks and Quicken software
This site is not affiliated with Sage Software - makers of Peachtree accounting software
XML SitemapXML Sitemap