Tutorial: how to move your big Content Library/lots of data to a new drive (free,fast,efficient)

I would like to present to all of you a possible solution for when you need to move your content Library from your old hard drive to a new one. In the past I tried many options and software (including payment ones) and my conclusion is that this way is the best one, and turns out to be free, huh.
This method is especially useful when your Content Library already reached thousands of gigabytes of memory or even terabytes.
Sadly, this is a solution only for people using Windows OS. I stop using Mac OS a long time ago and never ever tried Linux, so my knowledge about them is virtually zero at this point.
Also, I always isntall my bought assets manually, so I don't if this whole tutorial is valid or not for people who do otherwise.
1. Which software do we need?
We are only going to need Windows command prompt. This comes with all Windows OS versions as free. You can find it with a short search in your tools bar.
Just write in the search bar CMD and it should appear easily enough. As in my case, it may appear with another different name, so just try to find the right icon.
2. THIS STEP IS CRITICAL. Run Windows command prompt as administrator
Once we found the windows command prompt, we must run it as administrator. If we do not do so we will not have the permissions required to run the whole process.
In order to do so, we can right click on the icon and just select run as administrator.
3. Get familiar with the new window
If we did all the previous simple steps correctly, we should get a window like the following.
If you never used it before just leave it like that for now and just proceed to the next step.
4. Change the directory level of you Content Library directory.
Locate your Content Library directory.
Create a new random folder in the same directory where you content Library folder is located.
Put your Content Library folder inside the new folder we just created seconds ago. Maybe Windows will ask you administrator’s rights for this, in that case, just answer yes to it.
This step is quite necessary since the code we all going to run will copy all files from inside the directory of inside the directory we will indicate, but not that directory itself, so if we don't do something about it, final results could get a bit messy. It’s like our code copies everything inside two levels down of the level we indicate… (I feel my English is not clear in this point, sorry).
5. Writing the code.
Now let’s open the notepad and write the following code:
for /d %i in ("M:\new folder\*") do ( cd "%i" & ROBOCOPY "%i" "E:\daz library" /J /E /Z /ZB /MT:64 /R:5 /W:5 /COPYALL /SECFIX /log:"C:\Users\your pc user id\Desktop\e log\robocopy.log")
Let’s check bit by bit what each chunk means:
for /d ==> means IN (folder_set) DO command
%i ==> wildcard for all files in the specified directory
("M:\new folder\*") ==> the directory where we put our original Content Library folder. Yours could be C: something or wathever. Doesn’t matter. Just don’t forget to put the “” so it works even if our address contains black spaces in between the words.v
do ( cd "%i" & ROBOCOPY "%i" ==> this indicates to do the robocopy function (basically copy function) with all the files our computer may find in our already specified directory.
"E:\daz library" ==> where you want your new Content Library directory. Again do not forget the “”.
/J ==> Copy using unbuffered I/O (recommended for large files).
/E ==>Copy Subfolders, including Empty Subfolders.
/Z ==>Copy files in restartable mode (survive network glitch).
/ZB ==>Use restartable mode
/MT:64 ==> Multithreaded copying, n = no. of threads to use (1-128) #
default = 8 threads, not compatible with /IPG and /EFSRAW
The use of /LOG is recommended for better performance.
This is quite handy but be careful with what your PC can handle by itself.
/R:5 ==>number of retries for each file
/W:5 ==>wait time in between retries
/COPYALL ==> include all security info en SECFIX
/SECFIX ==> FIX file Security on all files, even skipped files.
When using /SECFIX, specify the type of security information you want to copy by
also using one of these options: /COPYALL /COPY:O /COPY:S /COPY:U /SEC
/log:"C:\Users\your pc user id\Desktop\e log\robocopy.log") ==> where to put the logfile which will be actualized constantly at real time while the process is running. If we do not use this piece of code, every step will be written in the windows command prompt itself which may cause some troubles eventually. Again do not forget “”.
6. Personalize the code with your own directories.
Personalize the code with the directories you may use (origin, destination, and where to put log file).
7. Run the code.
Copy your personalized code and paste it in the Widows command prompt window. Press the Enter key to start running the whole process.
If everything worked well you should see something like this:
For now, we can check the process in the log file from time to time, if we wish. My advice but it’s to DO NOT DO ANYTHING with PC until the robocopy process finishes since it will be under a lot of stress.
Process itself will be faster than we can imagine. From my experience, backing up whole drives with a size of almost 4TB takes two days or less for me (although my PC is quite bulky).
8. Last step. Set manyually your new Content Library directory inside DAZ
Also my advice would be to always have the same Content Library in TWO different sources just in case we may lose one for whatever reason.
It’s important to notice that if we use this robocopy code to do a backup instead of a full copy it will only write new or different files, so in that sense it’s quite handy.
And this is all for now, folks. I had an inspiration stroke and did this short tutorial, but for now, I am full. I may or may not rewrite and explain better some parts in the future, although I believe right now it already has all the important info. I hope it can be helpful to someone, it was to me when I first learnt it by myself. In any case feel free to ask, comment or even improve any part of this tutorial.
Lastly, I do not hold responsability for any messing people could do trying to follow these instructions. If you are not confident in your skills seek for help at your local computer store.
Best regards.
ps. yes I speak spanish as my first language, so please forgive all my spelling mistakes.
Comments
Thanks. Though I'm not really seeing the point of all this. For example, what I do to backup my data is to automatically "synchronize" my data folders to another drive or computer in the background on a daily basis. It's free software, and you just tell it what folder(s) to synchronize/copy, tell it just to copy the new/changed ones, and where to copy, and every day at the same time it keeps both folders in synch in the background.
Maybe this robocopy is necessary for you because you have so much data to copy on a one-time basis and you're worried something might happen in the middle of it, like losing the network or something? But don't you already maintain a backup copy?
A useful tip, and nicely explained. Now, I have never used the robocopy command (and have only just looked at it's help output (robocopy /?) and it's been a while since I have messed around at teh DOS command prompt, so I may be misconstruing things.
I think (stress think) you are over complicating things. With your example you move your content to the new folder you created, thus theer is just oen folder inside the new one. That would mean you have no real need to perform the loop, you coudl just sepcify the new folder, couldn't you? Also is theer a need to perform the cd command on each iteration (albeit in your example thetre will just be one interation, but even that single cd is not needed). I suspect the /MT:64 (multi-threading set to 64 threads) may want to be customised to better reflect the number of threads the computer in use can happily proivide..
He is overcomplicating things. Dragging and dropping or a simple copy and paste operation inside Windows works as well if you don't need the level of detail robocopy provides.
Unless you want to run a very complicated copy, or you need to do the exact same copy many different times (why I use it) this isn't needed. However if you have a lot if identical boxes and need to make a change robociopy is priceless.
Well, you people really have a point. I am the kind of person who over-complicates thing in order to get the most efficient way to do things ultimately. So neither I think it is that bad overall.
So yes, the most optimal way should be somehow having a daily backup system. In my case, I tried a few times, but never managed to be successful about it for one reason or another. So these days I just run this code once monthly and update my backup safety hard-drives. Therefore, I invite anybody with an effective way to create such a daily backup system to make a thread and explain it. Thanks in advance!
Nevertheless, yesterday I found two different topics made by users asking about similar questions: reaching the max memory capabilities of their respective main hard-drives; and how to move their Content library folders to a new directory in a different drive.
They were even asking if they should do it manually.
Therefore, I believed my tutorial would be useful enough for people who never before kept a backup system and suddenly they have to move around hundreds of gigas or even teras. Definitely just control c + control v (or just drag and drop) is not the best option and most payment programs are not satisfying enough (at least for me). Basically, Windows may probably crash if you just drag and drop teras just like that. Or worse,, it may stop at half of the process making you wonder if some files got corrupted.
Back in the day, when I did this research just for myself I had better reasons for explaining my choices, but nowadays I just kept the result of my research and forgot the theory behind…. Sorry :/
About why my shared code works in some kind of sub-level between folders I really don’t why exactly. I just remember this version of the code was the main one that worked in the best way possible. Therefore, I kept it. Again… sorry for the lack of solid theory...
Nevertheless, you just have to move your Content Library to a dummy folder before applying the code, so neither I think it is a big hassle. Still, if anybody would like to improve the code, they are welcome.
What I can explain better is the 64 thread thing. By default, robocopy function copies 8 files at the same time. However, if you have a good enough PC you can order it to copy more files at once and thus making the whole process faster. In any case, as I understand, there must be a loop in the process since robocopy goes folder by folder while copying files. It also will be on the user part to specify how to behave while doing so (like copying only files from a date one, leaving empty folders, etc.). Indeed, you can add many more parts to the code and making it much more efficient depending on your needs.
My conclusion is:
This looks more complicate than it really is. If you truly understand how it works, it is as easy as a copy-paste process; but instead of dragging and dropping a folder, you copy and paste a code in your command prompt window with the plus of feeling safe about unexpected crashes Windows could have if you do differently.
Thinking about it, it would be awesome to have some kind of thread with a compilation of all kind of backup systems DAZ users use.
Thanks for reading and commenting.
If my commenst sounded negative they were not meant to do so. As I said to start with, a useful tip, well-explained
My backups (for DAZ-related content) is to retain a separate copy of the install files as the program, etc., can always be re-installed. For DIM-based stuff my download location is on a different disk (so yes, that is a SPOF), and same disk is used to copy the .zip files from purchases at Renderosity, etc.
To do real backups you need an external drive, dedicated to backups, or a drive with removable media.
Then you can easily setup backups on any schedule.you want using the built in tool in Windows. I don't run automatic backups as I don't keep my backup drive connected at all times. I just have a notification popup every week and run the backup weekly. Short of getting an offsite backup server or a tape drive those are your best options.
Not at all. Don't worry. As I admit, my methods are quite unortodox but ineed I also try to find the best way to avoid any single point of failure. Mainly because I started to re-use DAZ a year ago after some years of don't using it and when I reconnected the drive where I had most of my stuff, it got corrupted eventually. From that moment on I tried to came up with the safest way to keep my files and thus I am positive all that experience and the learning I got from it could be also helpul to someone else in this community.
You are absolutely right. Maybe I took it from granted that this condition was implicit: we are talking about copying your stuff to other drives, usually external ones which you only use when in need. Otherwise would be like putting all your eggs in the same basket.
So yeah, me too I just run my backup process -since applying this code in an already writen drive will only update modfied files by default or add new ones as I already pointed- mostly montly .
Again, I believe overall sharing different insights it's helpul for people who never stop to think about it until they can't avoid it anymore, or like me; they lose everything by accident and have to start from scratch; so thanks.