Commandline NTBackup and GUID path..

J

Jake

Hi,

I want to use NTBackup to copy users' Outlook Express .DBX files to a
subfolder in their home directory.

NTBackup seems to want to show up in GUI mode even if I start it from
the command line. Can it be used in pure command line mode without ever
popping up to confuse the user?

If yes, which parameters do I use to simply copy

C:\Documents and Settings\%username%\<somefolder> to P:\Backups\<somefolder>

... overwriting the old backup with the new one (no incremental version
storage which grows the backup to astronimical sizes).

However the DBX files are located behind a folder with a GUID name
(%username%\Local Settings\Program
data\Identities\{GUID}\Microsoft\Outlook Express

How can I address this folder which have a different (and unknown) GUID
for each user?

Finally, if the above is possible, how could schedule tha batch file to
be started a certain time delay (say one hour) after the user has logged in?

I'm a newbie but I hope to learn from the tips I get here ;-)

Thanks anyway

7jake
 
M

Matthias Tacke

Jake said:
Hi,

I want to use NTBackup to copy users' Outlook Express .DBX files to a
subfolder in their home directory.

NTBackup seems to want to show up in GUI mode even if I start it from
the command line. Can it be used in pure command line mode without ever
popping up to confuse the user?

If yes, which parameters do I use to simply copy
copy or Backup?

to _copy_ use xcopy "source" "Dest"
C:\Documents and Settings\%username%\<somefolder> to
P:\Backups\<somefolder>

.. overwriting the old backup with the new one (no incremental version
storage which grows the backup to astronimical sizes).

However the DBX files are located behind a folder with a GUID name
(%username%\Local Settings\Program
data\Identities\{GUID}\Microsoft\Outlook Express

How can I address this folder which have a different (and unknown) GUID
for each user?
There might also be additional identities what makes it more difficult.

Assuming there is only one ID, try this:

@echo off&setlocal
CD /D "%username%\Local Settings\Program data\Identities\{*}"
for /F "tokens=2 delims={}" %%A in ("%CD%") do set GUID=%%A
CD "Microsoft\Outlook Express"
xcopy "%CD%\*.*" "P:\Some Folder\" /S [other xcopy options]

Finally, if the above is possible, how could schedule tha batch file to
be started a certain time delay (say one hour) after the user has logged
in?
If you schedule to one hour, who is logged in then? If P: is a network
path, it is not necessarily available running under a system account.

If a user is working copying might disturb heavily.

HTH
 
J

Jake

Matthias said:
copy or Backup?

backup because ntbackup also will back up 'open' files as these files
often are open during the time users are logged in.
There might also be additional identities what makes it more difficult.

I know, but only one of them is usually in use for each user.
Assuming there is only one ID, try this:

@echo off&setlocal
CD /D "%username%\Local Settings\Program data\Identities\{*}"
for /F "tokens=2 delims={}" %%A in ("%CD%") do set GUID=%%A
CD "Microsoft\Outlook Express"
xcopy "%CD%\*.*" "P:\Some Folder\" /S [other xcopy options]

Elegant! will try.
If you schedule to one hour, who is logged in then?

Almost all users work full day but they check mail and reply to received
messages just after logging in. I just wanted to avoid using additional
cpu cycles for this during and just after login.

If P: is a network
path, it is not necessarily available running under a system account.

Ooops. Will chek this too and set rights accordingly...
If a user is working copying might disturb heavily.

I thought that ntbackup was less exclusive as of cpu cycles as xcopy but
maybe I'm wrong...

If I would use ntbackup for the job above which parameters should I use..?

Thanks for you comments

/jake
 
M

Matthias Tacke

Jake said:
Matthias Tacke wrote:
If I would use ntbackup for the job above which parameters should I use..?
That won't help.
AFAIK the command line mode of ntbackup requires you to create a back
selection file in the Gui first.

See
ntbackup /?
 
J

Jake

Matthias Tacke skrev:
That won't help.
AFAIK the command line mode of ntbackup requires you to create a back
selection file in the Gui first.

See
ntbackup /?

Any other alternatives being capable to copy open files?

Tor
 
G

Gary Smith

Jake said:
Matthias Tacke skrev:
Any other alternatives being capable to copy open files?

Copying open files may not be a useful thing to do. The copy of a file
that was made while it was open for an application to write to may
be in an inconsistent state and therefore useless as a backup.
 

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