NT backup command line

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 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
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 ?


Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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.
adminslyAuthor Commented:
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 /?

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
/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.
Newly released Acronis True Image 2019

In announcing the release of the 15th Anniversary Edition of Acronis True Image 2019, the company revealed that its artificial intelligence-based anti-ransomware technology – stopped more than 200,000 ransomware attacks on 150,000 customers last year.

adminslyAuthor Commented:
you right i mean scheduled task, yes tell me how to port the command over the task scheduler.


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.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
adminslyAuthor Commented:
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 ?

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).
adminslyAuthor Commented:
thanks  mapledrum
No problem. Thanks for the points.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.