19. januar 2003 - 13:17Der er
32 kommentarer og 1 løsning
Mangler koder til MS backup
Hej Hvor finder jeg koderne til MS backup?
Jeg vil godt have at vinduet kører i minimeret tilstand - hvilken koder skal jeg bruge til det?
I stedet for at gemme backupen på "H:\backup.bkf" kunne jeg godt tænke mig, at backupen bliver navngivet med dags dato. Altså "H:\(Koden for dags dato).bkf". Hvad er koden for dette?
Jeg har kopieret fra plaglagte opgaver her:
C:\WINNT\system32\NTBACKUP.EXE backup "@D:\Documents and Settings\Administrator\Lokale indstillinger\Application Data\Microsoft\Windows NT\NTBackup\data\Backup.bks" /a /d "Kopisæt oprettet d. 19-01-2003 kl. 13:09" /v:yes /r:no /rs:no /hc:off /m normal /j "Backup" /l:s /f "H:\backup.bkf"
Efter ti år i London, Madrid, Paris og Utrecht kommer Sabios AI-fokuserede program af arrangementer om kundeoplevelser, ‘Disrupt’, for første gang til Danmark.
Har ikke fundet ud af hvordan man kører bacuppen minimeret, men dato problemet kan du løse således: download datetime fra http://plop.at Placer filen i system32 kataloget Herefter kan den bruges i batchfiler. Lavede denne lille test :
indholdet af den genererede c:\backup.bat: ntbackup backup "@c:\tb.bks" /d "test backup" /j "Backup" /f "c:\200103.bkf"
I dit tilfælde bør kommandolinien se således ud: datetime C:\WINNT\system32\NTBACKUP.EXE backup "@D:\Documents and Settings\Administrator\Lokale indstillinger\Application Data\Microsoft\Windows NT\NTBackup\data\Backup.bks" /a /d "Kopisæt oprettet d. 19-01-2003 kl. 13:09" /v:yes /r:no /rs:no /hc:off /m normal /j "Backup" /l:s /f "H:\!d!m!y.bkf" > c:\backup.bat
evt. kan du køre den via planlagte opgaver så du kører ovenstående linie først og et minut efter c:\backup.bat
Parameters systemstate Specifies that you want to back up the System State data. When you select this option, the backup type will be forced to normal or copy. @bks file name Specifies the name of the backup selection file (.bks file) to be used for this backup operation. The at (@) character must precede the name of the backup selection file. A backup selection file contains information on the files and folders you have selected for backup. You have to create the file using the graphical user interface (GUI) version of Backup. /J {"job name"} Specifies the job name to be used in the log file. The job name usually describes the files and folders you are backing up in the current backup job as well as the date and time you backed up the files. /P {"pool name"} Specifies the media pool from which you want to use media. This is usually a subpool of the Backup media pool, such as 4mm DDS. If you select this you cannot use the /A, /G, /F, or /T command-line options. /G {"guid name"} Overwrites or appends to this tape. Do not use this switch in conjunction with /P. /T {"tape name"} Overwrites or appends to this tape. Do not use this switch in conjunction with /P. /N {"media name"} Specifies the new tape name. You must not use /A with this switch. /F {"file name"} Logical disk path and file name. You must not use the following switches with this switch: /P /G /T. /D {"set description"} Specifies a label for each backup set. /DS {"server name"} Backs up the directory service file for the specified Microsoft Exchange Server. /IS {"server name"} Backs up the Information Store file for the specified Microsoft Exchange Server. /A Performs an append operation. Either /G or /T must be used in conjunction with this switch. Do not use this switch in conjunction with /P. /V:{yes|no} Verifies the data after the backup is complete. /R:{yes|no} Restricts access to this tape to the owner or members of the Administrators group. /L:{f|s|n} Specifies the type of log file: f=full, s=summary, n=none (no log file is created). /M {backup type} Specifies the backup type. It must be one of the following: normal, copy, differential, incremental, or daily. /RS:{yes|no} Backs up the migrated data files located in Remote Storage. The /RS command-line option is not required to back up the local Removable Storage database (that contains the Remote Storage placeholder files). When you backup the %systemroot% folder, Backup automatically backs up the Removable Storage database as well. /HC:{on|off} Uses hardware compression, if available, on the tape drive. /SNAP:{on|off} Specifies whether or not the backup is a volume shadow copy. /M {backup type} Specifies the backup type. It must be one of the following: normal, copy, differential, incremental, or daily. /? Displays help at the command prompt. Remarks You cannot restore files from the command line using the ntbackup command. The following command-line options default to what you have already set using the graphical user interface (GUI) version of Backup unless they are changed by a command-line option: /V /R /L /M /RS /HC. For example, if hardware compression is turned on in the Options dialog box in Backup, it will be used if /HC is not specified on the command line. However, if you specify /HC:off at the command line, it overrides the Option dialog box setting and compression is not used. If you have Windows Media Services running on your computer, and you want to back up the files associated with these services, see "Running Backup with Windows Media Services" in the Windows Media Services online documentation. You must follow the procedures outlined in the Windows Media Services online documentation before you can back up or restore files associated with Windows Media Services. You can only back up the System State data on a local computer. You cannot back up the System State data on a remote computer If you are using Removable Storage to manage media, or you are using the Remote Storage to store data, then you should regularly back up the files that are in the following folders: Systemroot\System32\Ntmsdata
Systemroot\System32\Remotestorage
This ensures that all Removable Storage and Remote Storage data can be restored.
Examples Example 1 The following example performs a normal backup named "My Job 1" of the remote share \\iggy-multi\c$. This example pulls a tape from the Backup media pool, and name the tape "Command Line Backup 1." The description of the backup job is "Command Line Functionality." The backup is verified after the backup job is complete, access is not restricted to the owner/administrator, the logging level is set to summary only, Remote Storage data is not backed up, and hardware compression is enabled.
ntbackup backup \\iggy-multi\c$ /m normal /j "My Job 1" /p "Backup" /n "Command Line Backup 1" /d "Command Line Functionality" /v:yes /r:no /l:s /rs:no /hc:on
Example 2 The following example performs a copy backup named "My Job 2" of the local drive D:\. The backed up files and folders are appended to the tape named "Command Line Backup 1." All other options default to those specified in the Backup program.
ntbackup backup d:\ /j "My Job 2" /a /t "Command Line Backup 1" /m copy
Example 3 The following example performs a backup using the backup type that is specified in the Backup program. It uses the backup selection file named Commandline.bks, located in the C:\Program Files\Windows NT\ntbackup\data\ directory to choose which files to backup. The backup job is named "My Job 3" and it overwrites the tape named "Command Line Backup 1" with the new name "Command Line Backup 2."
ntbackup backup "@C:\Program Files\Windows NT\ntbackup\data\commandline.bks" /j "My Job 3" /t "Command Line Backup 1" /n "Command Line Backup 2"
Example 4 The following examples show how to perform a backup to a file from the command line. All three examples use the Backup program's default values for the backup type, verification setting, logging level, hardware compression, and any other restrictions. The first example shows how to backup \\iggy-multi\d$ to the file D:\Backup.bkf. The second example shows how to append the same backup to the same file. The third example shows how to overwrite the file with the same backup. In all three examples a complete UNC name could be substituted for the drive letter (that is, instead of d:\backup.bkf, the user could specify \\iggy-multi\d$\backup.bkf as the backup destination).
ntbackup backup \\iggy-multi\d$ /j "Command Line Backup 4" /f "D:\backup.bkf"
ntbackup backup \\iggy-multi\d$ /j "Command Line Backup 6" /f "D:\backup.bkf"
Formatting legend Format Meaning Italic Information that the user must supply Bold Elements that the user must type exactly as shown Ellipsis (...) Parameter that can be repeated several times in a command line Between brackets ([]) Optional items Between braces ({}); choices separated by pipe (|). Example: {even|odd} Set of choices from which the user must choose only one Courier font Code or program output
Tror du har en eller anden fejl i stien. Er det korrekt at du lige pludselig har noget dansk "lokale indstillinger" inde i en path, som ellers ser ud til at være engelsk ? Det ser for mig ud til at den ikke kan finde BKS-filen, altså at stien er forkert.
Kender ikke nogen sådan på stående fod. Men de findes garanteret eller man kan lave dem ved hjælp af zip programmer, eller den meget simple med en batchfil hvor man benytter xcopy
Jeg prøver lige at kigge en ekstra gang på det en af dagene. Jeg tror måske ligefrem, at det er en bedre idé med en batchfil (xcopy).
Hvis det er, kan du så hjælpe mig med at lave en batchfil? Hvis jeg ikke finde ud af ms backup lukker jeg spørgsmålet her (du skal nok få dine point) og så åbner et med batchfil-løsningen.
Hvis man skulle lave en batch-fil, skal den kunne kopiere følgende:
Documents and Settings Min outlook data-fil Mine foretrukne
Det skal kopieres over på det andet drev. Det skal gemme under dato eller noget andet, så det ikke bliver overskrevet. Kopieringen skal ske 1 gang om dagen.
Det er næsten nemmere. Det var sådan jeg fandt ud af hvilke koder der skulle med. Men den tager ihvertfald ALT, både directorystruktur og skjulte filer. Det hele.
>>datetime set date1=!d-!m-!Y> c:\date1.bat Lav en batchfil med et indhold, der kan sætte en variabel til aktuel dato
>>call c:\date1.bat kør batchfilen og sæt derved en variable date1 til aktuel dato
>>h: skift til h: drevet
>>cd \ Sørg for at vi står i roden af h: drevet
>>md %date1% Lav den nye folder. (man er nødt til at være på h: drevet ellers kommer md med en fejlmeddelelse)
>>xcopy "%USERPROFILE%\*" h:\%date1% /s /e /c /h /k /o /y /i kopier hele den aktuelle brugers profil til den nye folder på h: drevet
>>xcopy "c:\dokumenter\*" h:\%date1%\dokumenter /s /e /c /h /k /o /y /i kopier c:\dokumenter\ til den nye folder på h: drevet
Hmm... sidder lige og kigger og det kan forresten være at jeg mangler at lave en folder "h:\<dato>\dokumenter". Jeg er ikke helt sikker på at xcopy selv vil lave den. Så følgende linie bør stå lige efter "md %date1%"
Jeg havde lavet en batchfil "c:\xcopy_tb.bat" med følgende indhold: -------- datetime set date1=!d-!m-!Y> c:\date1.bat call c:\date1.bat h: cd \ md %date1%
xcopy "%USERPROFILE%\*" h:\%date1% /s /e /c /h /k /o /y /i xcopy "c:\dokumenter\*" h:\%date1%\dokumenter /s /e /c /h /k /o /y /i -------- Lavede herefter en batchfil "tb111.bat" med følgende indhold: -------- start /min /low cmd /c c:\xcopy_tb.bat -------- Ved at køre tb111.bat, får man lige et sort glimt, som starter en ny minimeret dosboks, der kører backup-processen.
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.