PDA

View Full Version : Robocopy commands



Kyle
2006-03-27, 11:36
Robocopy seems to be a great way to automate backups, and thanks to dangerous dom, I have a script that will either perform the mirror or the backup function. But I want to be sure I understand what these two functions do. The way I understand it, backup will copy every file from the source onto the destination that is not already on the destination but will not delete any files at all. Mirror will make an exact copy of the source onto the destination and delete any files on the destination that are not on the source. Does either of these functions ever make changes to the source files?

Now, if I add files only to the source then it seems like either function will do the same thing. Is that correct?

If I change some genre tags on the source, will both mirror and backup make those changes on the destination? How about MusicMagic/IP codes saved to the track files?

Kyle
2006-03-27, 12:33
> Robocopy seems to be a great way to automate backups, and thanks to
> dangerous dom, I have a script that will either perform the mirror or
> the backup function. But I want to be sure I understand what these two
> functions do. The way I understand it, backup will copy every file from
> the source onto the destination that is not already on the destination
> but will not delete any files at all. Mirror will make an exact copy
> of the source onto the destination and delete any files on the
> destination that are not on the source. Does either of these functions
> ever make changes to the source files?

No, the source files will always be unaffected. If you specify the
source and destination the wrong way round or specify the wrong
destination with the /MIR option the results can be catastrophic.

> Now, if I add files only to the source then it seems like either
> function will do the same thing. Is that correct?

Yes, provided you only add files. I occasionally move some files
around, in this case the /MIR option will delete the original copy and
recopy the moved files to their new location.

> If I change some genre tags on the source, will both mirror and backup
> make those changes on the destination? How about MusicMagic/IP codes
> saved to the track files?

Yes, provided the file timestamp is updated robocopy should see the
changes. However some tag editors, such as Tag & Rename, have an
option not to update the timestamp. In this case robocopy would not be
aware that the file has changed. I've never used MusicMagic so I don't
know if it updates or preserves the files timestamp.

Richard

Richard, I don't know how your response got to another thread, but I'm going to ask my folloup here. If I move files from one folder to another on the source, will backup not make that change on the destination?

radish
2006-03-27, 12:35
Richard, I don't know how your response got to another thread, but I'm going to ask my folloup here. If I move files from one folder to another on the source, will backup not make that change on the destination?

MIR would make the same change as you made (move the file to a new place). Backup would create the file in it's new location, but wouldn't delete the original one, so it would look like a copy rather than a move.

Richie
2006-03-27, 12:41
I'd heard about the bug in the forum software but never been a victim myself so I'll reply using the forum rather than email.


If I move files from one folder to another on the source, will backup not make that change on the destination?

No. That's the main difference between the backup and mirror modes. In backup mode you'll end up with two copies of the folder in the backup location. The mirror mode will delete the first copy and then make another copy in the new location.

Richard

Kyle
2006-03-27, 12:47
In backup mode you'll end up with two copies of the folder in the backup location.
Richard

Then, if I later did a mirror command, the original file (in the old location) would be deleted?

Michaelwagner
2006-03-27, 12:54
thanks to dangerous dom, I have a script that will either perform the mirror or the backup function.
I'm sorry, I guess this is frivolous, but this just struck my funny bone.

You're running a backup script authored by someone calling himself Dangerous Dom?

Might be dangerous ...

Kyle
2006-03-27, 12:57
You're running a backup script authored by someone calling himself Dangerous Dom?

Might be dangerous ...

Yeah, but it works! I'm pretty gun-shy about backup programs after SyncToy ate my backup and original a couple of weeks ago. I've been re-ripping ever since. (Truth be known, there must have been some user error in there someplace, but I'm still trying to figure out what happened.)

Richie
2006-03-27, 13:27
Then, if I later did a mirror command, the original file (in the old location) would be deleted?

Yes. When you choose the mirror option you get a replica of your source. If you've deleted it from the source (or moved it) it'll get deleted from the backup.

Richard

2006-03-27, 15:11
GUI for robocopy, works great for me

http://copyrite.dynu.com/screenshots-hm.htm

-----Original Message-----
From: discuss-bounces (AT) lists (DOT) slimdevices.com
[mailto:discuss-bounces (AT) lists (DOT) slimdevices.com] On Behalf Of Kyle
Sent: Monday, March 27, 2006 2:58 PM
To: discuss (AT) lists (DOT) slimdevices.com
Subject: [slim] Re: Robocopy commands


Michaelwagner Wrote:
> You're running a backup script authored by someone calling himself
> Dangerous Dom?
>
> Might be dangerous ...

Yeah, but it works! I'm pretty gun-shy about backup programs after
SyncToy ate my backup and original a couple of weeks ago. I've been
re-ripping ever since. (Truth be known, there must have been some user
error in there someplace, but I'm still trying to figure out what
happened.)


--
Kyle
------------------------------------------------------------------------
Kyle's Profile: http://forums.slimdevices.com/member.php?userid=2541
View this thread: http://forums.slimdevices.com/showthread.php?t=22486

2006-03-27, 15:13
Here is the free one
http://www.softpedia.com/get/System/OS-Enhancements/RoboCopy-GUI.shtml


-----Original Message-----
From: discuss-bounces (AT) lists (DOT) slimdevices.com
[mailto:discuss-bounces (AT) lists (DOT) slimdevices.com] On Behalf Of
Emile_Weekes (AT) Dell (DOT) com
Sent: Monday, March 27, 2006 5:12 PM
To: discuss (AT) lists (DOT) slimdevices.com
Subject: RE: [slim] Re: Robocopy commands

GUI for robocopy, works great for me

http://copyrite.dynu.com/screenshots-hm.htm

-----Original Message-----
From: discuss-bounces (AT) lists (DOT) slimdevices.com
[mailto:discuss-bounces (AT) lists (DOT) slimdevices.com] On Behalf Of Kyle
Sent: Monday, March 27, 2006 2:58 PM
To: discuss (AT) lists (DOT) slimdevices.com
Subject: [slim] Re: Robocopy commands


Michaelwagner Wrote:
> You're running a backup script authored by someone calling himself
> Dangerous Dom?
>
> Might be dangerous ...

Yeah, but it works! I'm pretty gun-shy about backup programs after
SyncToy ate my backup and original a couple of weeks ago. I've been
re-ripping ever since. (Truth be known, there must have been some user
error in there someplace, but I'm still trying to figure out what
happened.)


--
Kyle
------------------------------------------------------------------------
Kyle's Profile: http://forums.slimdevices.com/member.php?userid=2541
View this thread: http://forums.slimdevices.com/showthread.php?t=22486

autopilot
2006-03-27, 16:01
I'm sorry, I guess this is frivolous, but this just struck my funny bone.

You're running a backup script authored by someone calling himself Dangerous Dom?

Might be dangerous ...

LOL, don't worry! I have tested it and tested it and tested it. I did not want to lose my originals either :)

The main thing to remember is the you get the source and destination in the right order in command line.

I.e. "ROBOCOPY /[SWITCHES] [SOURCE] [DESTINATION]"

When doing a backup or a mirror the source will never be changed. All that changes is how the source ends up looking. A mirror will make the folder/drive you mirror be exactly the same as the orginal (deleting any files that are not in the orginal). With the backup option, new/changed files will be copied over. But any you have deleted will be left in the destination. The drawback with a backup is that if you move/rename a folder you will end up with too copies. The upside to a backup is that if you delete some orginal files by mistake, you wont lose the back up.

There are switches to change the sourse to if you want, which can be useful, see the link below for more info.

I always start with a a full mirror after ripping/tagging a load of tracks, then back up from then on (well depends on what i have been doing - did a major reorginisation the other day so did a mirror).

I learnt the Robocopy switches in about 5 min from here (but there are better guides around, google a bit) - http://www.ss64.com/nt/robocopyXP.html

Learn how to write a batch file here (good guide) - http://www.computerhope.com/batch.htm

JJZolx
2006-03-27, 16:10
Then, if I later did a mirror command, the original file (in the old location) would be deleted?
If by "original file in the old location", you mean the _source_, no. The source should _never_ be altered. With perhaps one exception - you can reset the 'A' (archive) file attribute of the source (by using the /M switch).