?
Solved

Backup files automatically

Posted on 2007-04-02
19
Medium Priority
?
257 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
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

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…
Learn about cloud computing and its benefits for small business owners.
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
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). …
Suggested Courses

770 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