Solved

NT backup command line

Posted on 2003-10-31
9
3,554 Views
Last Modified: 2007-12-19
hi, i just find out that my backup was not working since a while, i have my tape fix and now i try to understand the bat file i have found.
here a look backup.bat
AT /DELETE
AT 21:30 /interactive /every:L cmd /c del c:\clients\backup\Lundi.log
AT 21:35 /interactive /every:L NTBACKUP BACKUP D:\ C:\ /v/d "Copie securité du Lundi" /l "C:\Clients\Backup\Lundi.log" /b /hc:on

AT 21:30 /interactive /every:M cmd /c del c:\clients\backup\Mardi.log
AT 21:35 /interactive /every:M NTBACKUP BACKUP D:\ C:\ /v/d "Copie securité du Mardi" /l "C:\Clients\Backup\Mardi.log" /b /hc:on

AT 21:30 /interactive /every:Me cmd /c del c:\clients\backup\Mercredi.log
AT 21:35 /interactive /every:Me NTBACKUP BACKUP D:\ C:\ /v/d "Copie securité du Mercredi" /l "C:\Clients\Backup\Mercredi.log" /b /hc:on

AT 21:30 /interactive /every:J cmd /c del c:\clients\backup\Jeudi.log
AT 21:35 /interactive /every:J NTBACKUP BACKUP D:\ C:\ /v/d "Copie securité du Jeudi" /l "C:\Clients\Backup\Jeudi.log" /b /hc:on

AT 21:30 /interactive /every:V cmd /c del c:\clients\backup\Vendredi.log
AT 21:35 /interactive /every:V NTBACKUP BACKUP D:\ C:\ /v/d "Copie securité du Vendredi" /l "C:\Clients\Backup\Vendredi.log" /b /hc:on

also in daily taskt i have 10 job from At1 to At10, what is 2 job per day the fisrt job that erase the log and the second job that do the backup. in task property, these job were create by
 NetScheduleJobAdd
how this is done ?
(i erase one job and when i re-create it, it does not have the name AT1)

i look at the command line and still wonder if i can have the tape to eject after backup complete ?

what /interactive  mean ?

thanks

sly
0
Comment
Question by:adminsly
  • 5
  • 4
9 Comments
 
LVL 5

Expert Comment

by:mapledrums
ID: 9661109
The 10 jobs you have (At1 to 10) are the 10 jobs that are created by your batch file. When you erase a job and add a new job, the name of the new job is carried on from the last job that was created. Probably At11 in your case. You can specify the ID of your job by specifying it in your command. Do a "at /?" for more info.

For file backups, you'll need to at least have Backup Operator status to perform the task. You can run it as a member of administrators group as well. The task scheduler has an option to run tasks under another account.

/interactive - Allows the job to interact with the desktop of the user who is logged on at the time the job runs. (From at /?)

I don't see an option to eject the tape after backup though. Do a ntbackup /? to see the options available.
0
 

Author Comment

by:adminsly
ID: 9662269
thanks to answer,  my batch file do i still need it ? do i need to run it ? do i need to run it from task manager ?
or you just create a batch file to create the schedule job in task manager and after oyu dont really need the batch ?

sorry i dont have my server at home so can not check AT /?

sly
0
 
LVL 5

Expert Comment

by:mapledrums
ID: 9662320
you should keep your batch file for reference in case anything goes wrong, so it's not advisable to delete it anyway as it pertains to data backup.

i believe you mean task scheduler, specifically "scheduled tasks" under control panel, not task manager. task manager is more for viewing running processes on your system.

you'll probably need to run the batch job once to schedule the backups, once created (you can check this by running "at" at the command prompt) you won't need to run them again. however, if the scheduled jobs do not stick after a reboot, you probably would want to point a reference to the batch file in autoexec.bat, ie. in autoexec.bat, type in the following:

call <path>\backup.bat

This is the reference for at /? on an XP Pro machine (my laptop :)). The parameters for that on NT server might be a little bit different.

The AT command schedules commands and programs to run on a computer at
a specified time and date. The Schedule service must be running to use
the AT command.

AT [\\computername] [ [id] [/DELETE] | /DELETE [/YES]]
AT [\\computername] time [/INTERACTIVE]
    [ /EVERY:date[,...] | /NEXT:date[,...]] "command"

\\computername     Specifies a remote computer. Commands are scheduled on the
                   local computer if this parameter is omitted.
id                 Is an identification number assigned to a scheduled
                   command.
/delete            Cancels a scheduled command. If id is omitted, all the
                   scheduled commands on the computer are canceled.
/yes               Used with cancel all jobs command when no further
                   confirmation is desired.
time               Specifies the time when command is to run.
/interactive       Allows the job to interact with the desktop of the user
                   who is logged on at the time the job runs.
/every:date[,...]  Runs the command on each specified day(s) of the week or
                   month. If date is omitted, the current day of the month
                   is assumed.
/next:date[,...]   Runs the specified command on the next occurrence of the
                   day (for example, next Thursday).  If date is omitted, the
                   current day of the month is assumed.
"command"          Is the Windows NT command, or batch program to be run.

Another alternative would be to port your batch files command to the task scheduler and dump the batch file, so that you can do away with your batch file completely. The task scheduler is a GUI version of the at command, with more options. This will also allow you easier maintenance of your backup process.

Let me know if you have any queries on how to port your commands over to the task scheduler. It's quite straightforward actually.
0
 

Author Comment

by:adminsly
ID: 9662794
you right i mean scheduled task, yes tell me how to port the command over the task scheduler.

thanks

sly
0
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
LVL 5

Accepted Solution

by:
mapledrums earned 20 total points
ID: 9663040
Do a "at /delete" at the command prompt to delete off the previous tasks setup.


Configure the Monday backup logs cleanup.

1) Goto Scheduled Tasks, File, New, Scheduled Task.
2) Give the job a relavant name (eg. Clear Monday Backup Logs).
3) Right cick on the new task, select Properties. Under Run, paste "cmd /c del c:\clients\backup\Lundi.log".
4) Under "Run As", put in an administrative account or backup operator account. Click "Set Password" & enter the respective password.
5) Select the Schedule tab, select Weekly under "Schedule Task:". Set the time and select Monday.

Do the same for the backup task.

Follow step 1 above
In step 2, give a name such as Monday Backups.
In step 3, put in "NTBACKUP BACKUP D:\ C:\ /v/d "Copie securité du Lundi" /l "C:\Clients\Backup\Lundi.log" /b /hc:on" under Run.
In step 4, Under "Run As", put in the same account as the previous task.
Configure the relavant time for step 5.

Do the same for the other 4 days. So you'll have 10 scheduled tasks when you're done. You can do a right click on a task & select Run to test that your task works.
0
 

Author Comment

by:adminsly
ID: 9663249
mapledrum  thanks but this is easy to do , you know i taught you gonna teach me how to, from my batch file et extract it to task scheduler just with one click or command ;-(

when you do the
AT /delete     that remove all schedule task ?

any suggestion for backup program ?

sly
0
 
LVL 5

Expert Comment

by:mapledrums
ID: 9663346
I'm afraid the job file created is in binary & I'm not sure how to convert or if it can be done.

Yes. The at /delete removes all scheduled tasks.

Some of the more popular/corporate backup programs would be Veritas Backup Exec (http://www.veritas.com/products/category/ProductFamily.jhtml;vrtsid=JT4TOBYPQPP3HQFIYCLCFFA?baseId=2021) and BrightStor Arcserve Backup (http://www3.ca.com/Solutions/ProductFamily.asp?ID=115).
0
 

Author Comment

by:adminsly
ID: 9664275
thanks  mapledrum
0
 
LVL 5

Expert Comment

by:mapledrums
ID: 9665240
No problem. Thanks for the points.
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

We all have limited time to study long and complicated information about RAID theories, but you may be interested as to how RAID 5 works. We made it simple for you by providing the shortest and easiest explanation ever.   First we need to remind …
AWS Glacier is Amazons cheapest storage option and is their answer to a ‘Cold’ storage service.  Customers primarily use this service for archival purposes and storage of infrastructure backups.  Its unlimited storage potential and low storage cost …
This video teaches viewers how to encrypt an external drive that requires a password to read and edit the drive. All tasks are done in Disk Utility. Plug in the external drive you wish to encrypt: Make sure all previous data on the drive has been …
This tutorial will walk an individual through the process of installing the necessary services and then configuring a Windows Server 2012 system as an iSCSI target. To install the necessary roles, go to Server Manager, and select Add Roles and Featu…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now