Backup command line

D

Danieltbt05

How to writre the backup command line for backup certain folder only to
another folder or another drive ? Pla advise. Thanks

Regards
Daniel
 
B

Brian Cryer

How to writre the backup command line for backup certain folder only to
another folder or another drive ? Pla advise. Thanks

Regards
Daniel

If you want to use "backup", i.e. ntbackup, then I don't think you can. Not
as a single line anyway. What you can do with ntbackup is to put together a
backup selection file that contains the folders that you want to backup. The
selection file is a text file that contains one folder per line, or you can
create it by running ntbackup interactively.

If what you are after is simply to copy one folder to another (its not clear
to me from your original posting) then why not use xcopy?
xcopy /d /s c:\source d:\destination
xcopy won't remove any files from the destination that no longer exist in
the source folder, but if you require that functionality I can lay my hands
on a command line utility that will do it.

Hope this helps.
 
D

Danieltbt05

What i want is to use ntbackup perform backup to one of my folder at
scheduled time using task scheduler. So i need a command line for
backup to do that. or any free utility can do that ? Thanks

Rgds
Daniel
 
H

Hank Arnold

Maybe I don't understand what you are trying to do, but whenever I
create an NTBACKUP job using the GUI, I can click on the "advanced"
button instead of running it. I can then set up a schedule for that job.

If you really need a command line option, try entering

NTBACKUP /?

at a command prompt. It will give you all the options available....

Regards,
Hank Arnold

What i want is to use ntbackup perform backup to one of my folder at
scheduled time using task scheduler. So i need a command line for
backup to do that. or any free utility can do that ? Thanks

Rgds
Daniel
 
B

Brian Cryer

What i want is to use ntbackup perform backup to one of my folder at
scheduled time using task scheduler. So i need a command line for
backup to do that. or any free utility can do that ? Thanks

Technically you can call ntbackup directly from the scheduler, but I would
be inclined to put together a command (.cmd) file with everything in it,
ensure that works and then call that from the scheduler.

If you want to backup all of C: (including system state) to a file on the D
drive:

ntbackup backup systemstate c:\ /f d:\output\backup.bks

if you wanted to backup only one folder from C (without system-state):

ntbackup backup C:\MyFolder /f d:\output\backup_of_myfolder.bks

I would be inclined to also specify the switches: /V:no /M normal
I suspect they are not required. /v:no is saying don't verify, /m normal is
saying its a normal backup. Yes the colon after the /V and space after /M
are right!

You can specify one source folder on the command line, but if you need finer
control - say to backup two folders but not all of c: then you will need to
use a bks script.

The online documentation isn't bad. At the command prompt enter:
ntbackup /?

Hope that gives you enough to get going.
 
D

Danieltbt05

Is this method same as using scheduler ?

Hank said:
Maybe I don't understand what you are trying to do, but whenever I
create an NTBACKUP job using the GUI, I can click on the "advanced"
button instead of running it. I can then set up a schedule for that job.

If you really need a command line option, try entering

NTBACKUP /?

at a command prompt. It will give you all the options available....

Regards,
Hank Arnold
 
H

Hank Arnold

Every time I've done it, the job appears under "Scheduled Tasks".

Regards,
Hank Arnold
 
D

Danieltbt05

Hank, anyway to backup by day ? lets say monday a copy , then tuesday
it will backup a copy and so on..

Regards
Daniel
 
H

Hank Arnold

If I understand you, what you want is a "Monday" copy and a separate
"Tuesday" copy, etc..

Three ways I can think of.

First is to create a batch file with the required NTBACKUP command for
each day. Edit them so that the target file name is different for each
batch file. Then schedule one for each day.

Second is to have a single batch file that runs each day and names the
target file according to the day (this is beyond me, I'm just suggesting
it).

Third is to back up to tape on a daily basis and keep a library of tapes.

Regards,
Hank Arnold

Hank, anyway to backup by day ? lets say monday a copy , then tuesday
it will backup a copy and so on..

Regards
Daniel
 
D

Danieltbt05

Can it backup automatically or i have to do manually ?

Regards
Daniel

Hank said:
If I understand you, what you want is a "Monday" copy and a separate
"Tuesday" copy, etc..

Three ways I can think of.

First is to create a batch file with the required NTBACKUP command for
each day. Edit them so that the target file name is different for each
batch file. Then schedule one for each day.

Second is to have a single batch file that runs each day and names the
target file according to the day (this is beyond me, I'm just suggesting
it).

Third is to back up to tape on a daily basis and keep a library of tapes.

Regards,
Hank Arnold
 
D

Danieltbt05

What you recommend in 2nd method is create .bat file with the ntbackup
command in it and save them as separate file like monday, tuesday and
assign each to each day in the seheduler ?



Hank Arnold wrote:ds
If I understand you, what you want is a "Monday" copy and a separate
"Tuesday" copy, etc..

Three ways I can think of.

First is to create a batch file with the required NTBACKUP command for
each day. Edit them so that the target file name is different for each
batch file. Then schedule one for each day.

Second is to have a single batch file that runs each day and names the
target file according to the day (this is beyond me, I'm just suggesting
it).

Third is to back up to tape on a daily basis and keep a library of tapes.

Regards,
Hank Arnold
 
B

Brian Cryer

What you recommend in 2nd method is create .bat file with the ntbackup
command in it and save them as separate file like monday, tuesday and
assign each to each day in the seheduler ?

Yes, I think that's what he's getting at.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top