?
Solved

Incremental bat backup script.

Posted on 2009-07-07
13
Medium Priority
?
916 Views
Last Modified: 2012-06-21
Hi EE.

i need a little help for a simple script.

Wants to some folders to be incremental backup

From C:\App -> E:\App
From C:\List -> E:\App.

I have worked a bit with my own script, but cant get it to work 100 %.

If i delete a file in C:\App the file also should be deleted in E:\App

Thank you
0
Comment
Question by:JarlK
[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
  • 5
  • 5
  • 3
13 Comments
 
LVL 9

Accepted Solution

by:
DCMBS earned 1000 total points
ID: 24792788
I would use the following delta copy utilty for this.  when set up correctly it will synchronise the destination and source folders automatically and is very efficient at copying the files.

http://www.aboutmyip.com/AboutMyXApp/DeltaCopy.jsp
0
 
LVL 19

Assisted Solution

by:deroode
deroode earned 200 total points
ID: 24792868
Normally, you would use a tool like robocopy  to perform such a synchronization.

Robocopy.exe c:\app e:\app /mir

The culprit however is that you are trying to synchronize from two directories to one. Robocopy will mirror the entire directory, thus with the above command deleting everything that originally came from C:\list

A solution could be devised if the filenames in C:\app and c:\list are sufficiently different that the filenames that are found in c:\list can be excluded in the robocopy command from c:\app, and vice versa.

for instance:

robocopy c:\app e:\app /mir /XF *.lst
robocopy c:\list e:\app /mir /XF *.exe


robocopy can be found here:
http://www.microsoft.com/downloads/details.aspx?FamilyID=9D467A69-57FF-4AE7-96EE-B18C4790CFFD&displaylang=en
0
 
LVL 9

Expert Comment

by:DCMBS
ID: 24792910
Robocopy is a good tool and works similarly to deltacopy. The main difference is that robocopy copies the entire file every time it detects a change whereas deltacopy will only copy changes to the file.  If you have large files in which only a small parts are changed then deltacopy can be very efficient.
0
Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

 

Author Comment

by:JarlK
ID: 24793014
I like deltatool.

I can get it to work on my machine, but not on my costumers ?




Connection is sucessful when i try to test the connection!
Executing: rsync.exe  -v -rlt -z --delete "/cygdrive/C/util/" "HP11103174822::Villadsenssmedie	/util/"
@ERROR: Unknown module 'Villadsenssmedie	'
 
rsync error: error starting client-server protocol (code 5) at /home/lapo/packaging/rsync-3.0.4-1/src/rsync-3.0.4/main.c(1504) [sender=3.0.4]
 
Error starting client-server protocol
Rsync.exe returned an error. Will try again. This is retry number 1 of 5
 
Executing: rsync.exe  -v -rlt -z --delete "/cygdrive/C/util/" "HP11103174822::Villadsenssmedie	/util/"
@ERROR: Unknown module 'Villadsenssmedie	'
rsync error: error starting client-server protocol (code 5) at /home/lapo/packaging/rsync-3.0.4-1/src/rsync-3.0.4/main.c(1504) [sender=3.0.4]
 
Error starting client-server protocol
Rsync.exe returned an error. Will try again. This is retry number 2 of 5
 
Executing: rsync.exe  -v -rlt -z --delete "/cygdrive/C/util/" "HP11103174822::Villadsenssmedie	/util/"
@ERROR: Unknown module 'Villadsenssmedie	'
rsync error: error starting client-server protocol (code 5) at /home/lapo/packaging/rsync-3.0.4-1/src/rsync-3.0.4/main.c(1504) [sender=3.0.4]
 
Error starting client-server protocol
Rsync.exe returned an error. Will try again. This is retry number 3 of 5
 
Executing: rsync.exe  -v -rlt -z --delete "/cygdrive/C/util/" "HP11103174822::Villadsenssmedie	/util/"
@ERROR: Unknown module 'Villadsenssmedie	'
rsync error: error starting client-server protocol (code 5) at /home/lapo/packaging/rsync-3.0.4-1/src/rsync-3.0.4/main.c(1504) [sender=3.0.4]
 
Error starting client-server protocol
Rsync.exe returned an error. Will try again. This is retry number 4 of 5
 
Executing: rsync.exe  -v -rlt -z --delete "/cygdrive/C/util/" "HP11103174822::Villadsenssmedie	/util/"
@ERROR: Unknown module 'Villadsenssmedie	'
rsync error: error starting client-server protocol (code 5) at /home/lapo/packaging/rsync-3.0.4-1/src/rsync-3.0.4/main.c(1504) [sender=3.0.4]
 
Error starting client-server protocol
Profile 'test' executed in 344 milliseconds. One or more errors were encountered.

Open in new window

0
 
LVL 9

Expert Comment

by:DCMBS
ID: 24793072
HP11103174822::Villadsenssmedie      /util/

This doesn't right if you are copying to a remote machine.

See the following link for how to specify the connection.

http://everythinglinux.org/rsync/
0
 
LVL 19

Expert Comment

by:deroode
ID: 24793076
HP11103174822 can be found without full domain name?

Villadsenssmedie is configured as a virtual directory on the receiving server?
0
 

Author Comment

by:JarlK
ID: 24793123
Its just a single computer.

The network name of the computer is : HP11103174822

So i have installed the server and client on same machine!
0
 
LVL 9

Expert Comment

by:DCMBS
ID: 24793137
I can get it to work on my machine, but not on my costumers ?

Apologies, I don't quite understand.

what is the difference between a set up that works on your machine, and the setup that doesn't work
0
 

Author Comment

by:JarlK
ID: 24793143
DCMBS : I just tried to make a test on my own pc, where i had no problems at all.
0
 
LVL 9

Expert Comment

by:DCMBS
ID: 24793159
So we need to pin down the difference between machines ?
0
 

Author Comment

by:JarlK
ID: 24793182
I have found the error!

:) I have made a space in the name of the "server" That is not allowed! Thank you!


Very nice app.
0
 
LVL 19

Expert Comment

by:deroode
ID: 24793203
Very nice app indeed.

And does it handle the two sources - one destination conflict without removing files?
0
 

Author Comment

by:JarlK
ID: 24793277
Yes !

Very nice!
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

YESTERDAY YESTERDAY.BAT is inspired by a previous article I wrote entitled: TOMORROW.BAT (http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/MS_DOS/A_4196-Advanced-Batch-File-Programming-TOMORROW-BAT.html). The crux of this batch f…
This article is the result of a quest to better understand Task Scheduler 2.0 and all the newer objects available in vbscript in this version over  the limited options we had scripting in Task Scheduler 1.0.  As I started my journey of knowledge I f…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses
Course of the Month9 days, 23 hours left to enroll

762 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