cmd base backup script required..

Adil January 29, 2009 at 05:52:17
Specs: Windows XP

Hey all

I need a backup script for my testing...
Please if any can help provide me which could easily backup data and automically update through the schedule..

It would be my pleasure by hearing from..
u can also mail me the script..
Adil Ghori

See More: cmd base backup script required..

Report •

January 29, 2009 at 06:26:38
Open a command prompt and type:
ntbackup /?
That will give you the command line switches. It can also be done from the GUI.

Report •

January 29, 2009 at 07:33:50
I wouldn't rely on ntbackups built in scheduling feature. Having much experience and little to no long-lasting luck with it, I gave up trying to use it years ago.

What I do is, run the ntbackup wizard and setup the backup. I also save it as a 'scheduled task' within ntbackup. Then, once I'm happy with the backup set, I open the scheduled backup (within ntbackup) and copy the command line for the actual backup and put that in a batchfile.

Once I have the batchfile, I delete the scheduled backup in ntbackup and then go to:

Start >> Programs >> Accessories >> System Tools >> Scheduled Tasks

And create a scheduled task there that points at my backup batchfile.

Below is an actualy batchfile I've used in the past. It's purpose it to perform a backup on one specific PC/Server and then copy that backup file from the PC it just backed up to another PC/Server within the network.

I use this at home on all XP Pro PC's in my house. They all backup to my main PC. I then backup the folder containing all backups onto DVD-RW's regularly.

***Begin Batchfile***

@echo off

rem clear mapped network drive

net use w: /d /y

rem map network drive to backup folder on server

net use w: \\server\share /persistent:yes

rem perform the backup

C:\WINDOWS\system32\ntbackup.exe backup "@C:\Documents and Settings\user\Local Settings\Application Data\Microsoft\Windows NT\NTBackup\data\Daily Backup.bks" /n "Daily Backup.bkf created 6/6/2005 at 11:04 AM" /d "Set created 6/6/2005 at 11:04 AM" /v:yes /r:no /rs:no /hc:off /m normal /j "Daily Backup" /l:s /f "C:\Backup\Daily Backup.bkf"

rem copy the backup to the server

xcopy c:\backup\"daily backup.bkf" w:\ /y

rem release mapped drive

net use w: /d /y

rem exit the batch file


***End Batchfile***

The reason for all the mapping and unmapping of the drive is years of using windows has also proven to me it has issues with keeping drive mappings properly. Thus I release the drive at the end of the batchfile. But, if windows decides to not release the drive properly, I do it again at the begining of the batchfile. It's convoluted yes, but this batchfile has worked for me for years without issue as it is.

I hope this helps.

Report •

March 17, 2009 at 22:51:15
hey guys thnx for ur kind reply ! but i need a simple and a multi-task script...
As it copies the data to my bak-up server also do some little jobs to me...
I want to add time and and date folder to it also want to log in from the script as there is password there to the system where I want to copy data from.
please help me out...

Report •

Related Solutions

Ask Question