Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Backup files automatically

Posted on 2007-04-02
19
Medium Priority
?
258 Views
Last Modified: 2010-03-05
Hi,

I want to schedule to backup 1 file every 1 hr.Excel file.How can i do this.With a windows inbuilt component.

THX
SHarath
0
Comment
Question by:bsharath
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 10
  • 8
19 Comments
 
LVL 67

Expert Comment

by:sirbounty
ID: 18836724
On what OS?

From a command line, this should work:

schtasks /create /ru System /sc hourly /st 09:00:00 /tn Backup /tr "cmd /c copy c:\sourcefolder\file.xls c:\targetfolder /y"
0
 
LVL 30

Expert Comment

by:LauraEHunterMVP
ID: 18836726
Use the ntbackup command-line utility (syntax available here: http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/ntbackup_command.mspx?mfr=true), or click on the "Backup" icon under Accessories-->System Tools.

Hope this helps.

Laura E. Hunter - Micorosft MVP: Windows Server - Networking
0
 
LVL 67

Expert Comment

by:sirbounty
ID: 18836736
Or, within the GUI version (in control panel) define the schedule task, but just precede the 'run' command line with
cmd /c
This is because 'copy' is an internal command and must be passed through the command interpreter (cmd)
0
Fill in the form and get your FREE NFR key NOW!

Veeam® is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

 
LVL 11

Author Comment

by:bsharath
ID: 18836800
Windows 2003
0
 
LVL 67

Expert Comment

by:sirbounty
ID: 18836819
Then the schtasks route should work fine...
0
 
LVL 11

Author Comment

by:bsharath
ID: 18836840
Will this back up  the file every 1hr
0
 
LVL 67

Expert Comment

by:sirbounty
ID: 18836871
Yes, my example above 'starts' at 9am - but you can change that to any starting time...(the /st parameter)
0
 
LVL 11

Author Comment

by:bsharath
ID: 18840882
sirbounty:

I use windows 2003 it seems it does not work.

Can you give it as any file in the folder to copy to a new location.

THX
Sharath
0
 
LVL 67

Expert Comment

by:sirbounty
ID: 18840900
What results did you see?
Of course, the sourcefolder and targetfolder paths will need to be changed, and the file.xls will need to be your file.  The only thing I can think of right now is that maybe your path has spaces in it?  If so, post the full path(s) please and I'll help you get it working...

Otherwise, you might simply create a small batch file and call it.

1) Create the batch file - save it as c:\backup.bat
In this file, you'll only have one line:
@copy "c:\sourcefolder\file.xls" "c:\targetfolder\" /y

2) Schedule it to run
schtasks /create /ru System /sc hourly /st 09:00:00 /tn Backup /tr "cmd /c c:\backup.bat"
0
 
LVL 11

Author Comment

by:bsharath
ID: 18840924
This worked thanks how can i do it for the whole folder or its contents in it.
0
 
LVL 67

Expert Comment

by:sirbounty
ID: 18840925
Just change the batch file to xcopy instead of copy...

@xcopy "c:\sourcefolder\" "c:\targetfolder\" /y
0
 
LVL 11

Author Comment

by:bsharath
ID: 18840935
Will this go on overwriting the folder every 1 hr
0
 
LVL 67

Expert Comment

by:sirbounty
ID: 18840937
Yes, the /y determines that it overwrites without prompting.
If the scheduled task is set to recur every hour, it will fire that batch file every hour...
0
 
LVL 11

Author Comment

by:bsharath
ID: 18840943
This did not work
This is the path
@xcopy "F:\India List\" "c:\India list\" /y
0
 
LVL 67

Expert Comment

by:sirbounty
ID: 18840957
Is F a mapped drive?
If so, you won't be able to use SYSTEM for the /ru parameter...you'll need to substitute
/ru SYSTEM
for
/ru Domain\Username /rp Password
in order for it to work.

You may also need to adjust your batch file to either map the drive or simply use the UNC path:

@xcopy "\\Server\Share\India List\" "c:\India list\" /y
0
 
LVL 11

Author Comment

by:bsharath
ID: 18840974
F: is a local drive in my machine
0
 
LVL 67

Accepted Solution

by:
sirbounty earned 2000 total points
ID: 18840979
Hmm - it works with one file, but not with multiple?
Perhaps try

@xcopy "F:\India List\*.*" "c:\India list\" /y
0
 
LVL 11

Author Comment

by:bsharath
ID: 18840990
Great this worked.Thanks a lot for the support.

I have some questions posted which may require your help can you please look into it.

THX
Sharath
0
 
LVL 67

Expert Comment

by:sirbounty
ID: 18840994
Sure.
Glad I could assist you here. :^)
0

Featured Post

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Background Information Recently I have fixed file server permission issues for one of my client. The client has 1800 users and one Windows Server 2008 R2 domain joined file server with 12 TB of data, 250+ shared folders and the folder structure i…
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

618 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