Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: ROBOCOPY - Create Backup Script

22 Feb 2014   #230
derekimo

Microsoft Community Contributor Award Recipient

 
 

Quote   Quote: Originally Posted by epoc View Post

The issue - when I attach my phone to a PC with a USB cable, I see it listed in Windows Explorer along with the hard drives and DVD on the PC. It's labeled "SPH-L710".
Specs - Sprint Cell Phones SPH-L710 | Samsung Cell Phones

Following on Kari's advice about using Mass Storage Mode to be able to give it a drive letter.

There does seem to be quite a few queries about how to enable this, everything I could find requires the phone to be rooted though.


My System SpecsSystem Spec
.
22 Feb 2014   #231
A Guy

Microsoft Community Contributor Award Recipient

Windows 7 Home Premium x64 SP1
 
 

My searches all said the phone must be rooted for the various workarounds (apps, etc.). A Guy
My System SpecsSystem Spec
22 Feb 2014   #232
epoc

Windows 7 Home Premium 32 bit
 
 

I appreciate the feedback. I won't be ale to root the phone due to a situation outside my control (employer security controls, and they pay the bill). I will just do copy/paste to backup the cell phone for now.

Again, thank you for the replies.
My System SpecsSystem Spec
25 Feb 2014   #233
hossam

Win7
 
 
Need help

Hi ,
I have been having hard time getting a script working my target is the following ,
1- TO have the script prompt the user for their windows user name
2- Prompt the user for their USB drive letter X:
3- Back up the entire user profile based on the user name input considering some users on XP other on 7
4- Backup will copy PST files
5- Backup C:\Program Files (x86)\Notes\Data

There was a post it does the same task but for some reason it’s not working for me .

Thank you in advance .
My System SpecsSystem Spec
.

18 Jun 2014   #234
dpwoodpecker

Windows 7 Pro Version 6.1.7601 Service Pack 1 Build 7601, clean OEM re-install
 
 

Quote   Quote: Originally Posted by Golden View Post

...... ROBOCOPY is designed to backup/copy folders to another destination (different disk, external USB drive). The idea is that if the original files are accidently deleted or damaged, you can simply copy the required from the backup location to where you need them.

If you need help setting up a robocopy script to backup your data, then let me know and I'll write one for you.

Regards,
Golden
Hello - I indeed need help with the syntax for running a robocopy script to copy my data in three folders on external HDD (partition G) to the main data folder on the internal SSD data partition D with the parameters below...am attaching the disk management info of the disks/partitions

· Copy all subfolders (there are over 1000 folders) and files
· Keep the original time/date stamps of all folders and files
· Keep original attributes, permissions/access/owner info, etc.
· One of the three folders is about 30GB so please help with the multi-thread parameter set up
· Keep a copy of log file to know that the script ran okay and if any files couldn’t be copied over.

ROBOCOPY - Create Backup Script-20140614-diskmgmt-ssd-ext-hdd.jpg

Also, to which location should the script be saved (I have 2 user accounts: an admin and a standard user) in the standard user's Users folder? or in C partition? and I probably need to run as administrator, right?

2)
I had used an older version of SyncBack for data backup and just tried FreeFileSync. But with both programs, all the subfolders had newly created dates and did not retain the original folders’ date/time stamps when the data was copied. Is such a setting available in these programs that I didn't see to set up?

3) If not, can robocopy be used for incremental backups as well as full? How to schedule the script to run a set backup routine?

5) A side question: I plan to use a 1TB external HDD for the image backups and the data backups; should I have just one partition and make two main folders to keep these backups separate or should I make separate partitions? How should the security tab read for permissions/access - that is, should both user accounts have full control

I've been working on this for several days without much luck so greatly appreciate some timely help!


My System SpecsSystem Spec
18 Jun 2014   #235
Kaktussoft

Microsoft Community Contributor Award Recipient

Microsoft Windows 7 Home Premium 64-bits 7601 Multiprocessor Free Service Pack 1
 
 

Code:
 
robocopy c:\source d:\target /e /b /efsraw /copyall /dcopy:t /r:2 /w:5 /xj /xd "System Volume Information" /XF pagefile.sys hiberfil.sys /log:d:\robocopy.log
Robocopy Syntax, Command Line Switches and Examples « My Digital Life

Maybe add /MT:16 (16 threads. 8 is default). /MT is not compatible with /EFSRAW !
My System SpecsSystem Spec
18 Jun 2014   #236
dpwoodpecker

Windows 7 Pro Version 6.1.7601 Service Pack 1 Build 7601, clean OEM re-install
 
 

Thank you...I don't have encrypted files to copy onto the SSD so will remove the /EFSRAW parameter to be able to use the /MT:16 parameter and give this a try. ---dpwoodpecker
My System SpecsSystem Spec
19 Jun 2014   #237
dpwoodpecker

Windows 7 Pro Version 6.1.7601 Service Pack 1 Build 7601, clean OEM re-install
 
 

I got errors running the command line suggested – flags that my admin user doesn’t have Manage Auditing user rights needed for parameter /copyall. Then was flagged with not having Backup and Restore rights when I changed to /copy: with DATSO just to see it would run at all. Attached is the log and the properties/security tab info for source G: (external HDD) and the destination D: (internal SSD).

20140618 Robocopy log.txt

ROBOCOPY - Create Backup Script-20140614-partition-g-securitytab-info.jpg

ROBOCOPY - Create Backup Script-20140614-partition-d-securitytab-info2.jpg

Background info: I was logged on admin user account and I just typed cmd in the run…command box that opened up the command prompt window with the blinking cursor at prompt C:\Users\UBC-Admin> ----just wondered whether the robocopy command should be executed from this directory.

I would also appreciate getting help in doing this in a way that I can use notepad to edit the necessary command line parameters as needed and then somehow run the command from that file instead of having to retype the entire long line every time and to add to the log file instead of overwriting it.....hope this make sense and thank you for timely help!


My System SpecsSystem Spec
08 Jul 2014   #238
Myrli

Windows 7 Ultimate 32-bit
 
 
Catastrophic failure

I imagine it is possible for the remote file structure to be compromised in such a way that running the backup script will simply replace your backup copy with an empty directory or empty files.

I've thought of a few ways to counteract this - one would be to create rolling backups by date and perhaps check size - if there is a major change in size, then throw an alert. Unfortunately this increases copy time as you're copying the whole file structure again each time.

The other option is to have it go through a dry run (/L), note if an inoranate number of files have been removed and don't perform the final action without interactive authorization but otherwise execute it automatically. (this is what I'm doing now, albeit manually).

Any more strategies that may be out there?

Or am I just being overly paranoid? Do these glitches just not happen? Remote mount points or file structure links get switched is just not something that happens?

Reviewed the prior posts in this thread but didn't see this brought up.

Thanks!
My System SpecsSystem Spec
27 Aug 2014   #239
RayBKaty

Windows 7
 
 
Don't Understand Robocopy Actions

Greetings,

I have a written a Robocopy bat file to back up the files on my laptop to a portable USB connected drive. I had some issues with the date functions but got that straightened out.

Here is the bat file:

@Echo Off
Echo.
Echo.
Echo You must run this file by right clicking and run as Administrator.
Echo If not you won't get all the files. Crtl C exits.
Echo.
Echo.
If exist E:\ (Echo. External USB HD ready for BackUp) else (Echo. No External USB HD detected & Goto :EOF)
Echo.
pause
Echo.


For /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set ToDay=%%c-%%a-%%b)

Robocopy "C:\Users\%UserName%\Favorites" "E:\Ray_BackUp-%ToDay%\Favorites" /E /Z /XA:H /R:10 /W:20

Robocopy "C:\Users\%UserName%\Desktop\*.bat" "E:\Ray_BackUp_%ToDay%\Desktop" /E/Z /XA:H /R:10 /W:20

Robocopy "C:\Users\%UserName%\Documents" "E:\Ray_BackUp_%ToDay%\My Documents" /E /Z /XA:H /R:10 /W:20

Robocopy "C:\Users\%UserName%\AppData\Local\Microsoft\Windows Live Mail" "E:\Ray_BackUp_%ToDay%\Windows Mail" /E/Z /XA:H /R:10 /W:20

Robocopy "C:\Xnews_test 2006.06.28" "E:\Ray_BackUp_%ToDay%\XNEWS" /E /COPYALL /R:10 /W:20

Set ToDay=
::END_OF_BATCH
Echo.
Echo.
Echo. All Done
pause


When I run this bat file as an Administrator, it produces 5 folders:

Ray_BackUp_2014-08-27 which contains the Favorites folder and its contents
Ray_BackUp_2014-08-27 which contains the Desktop folder and this bat file
Ray_BackUp_2014-08-27 which contains the My Documents folder and its contents
Ray_BackUp_2014-08-27 which contains the Windows Live Mail Folder and its contents
Ray_BackUp_2014-08-27 which contains the XNEWS Folder and its contents.

So everything gets copied, however, I really wanted something like this:

Ray_BackUp_2014-08-27 with a subfolder for Favorites
a subfolder for Desktop
a subfolder for My Documents
a subfolder for Windows Live Mail
a subfolder for XNEWS

Just so you know, I keep 2 backups and delete the oldest backup so I don't want to mess with using the feature that copies only the newest files, etc.

So can someone help me fix my bat file to get the desired results?

Thanks in advance for your help and suggestions!
My System SpecsSystem Spec
Comment

 ROBOCOPY - Create Backup Script




Tutorial Tools Search this Tutorial
Search this Tutorial:

Advanced Search




Similar help and support threads
Windows 7 Tutorial Category
robocopy script is not working through Scheduler
Dear All, My batch file of robocopy is working fine. But when I tried to run it through task scheduler, none of the files transfer to the target location. @echo off echo +-----------------------------------------+ echo Database Export Utility for server ...
General Discussion
Robocopy Backup - ERROR 5 (0x00000005)
Hi, I'm wondering if anyone might be able to shed some light on why I am getting the following such errors when running a robocopy batch file (as administrator) which cause the backup script to stall (- albeit temporarily): I am using the following backup command: robocopy "%srcPath%\My...
Backup and Restore
How 2 create a script/BAT or something that changes my desktop image?
Okay so I just got this program called Transparent Screen Lock and you can run files when the program starts/locks and closes/unlocks. What I would like to do is create a script or something that changes my desktop background to an image when I click "lock" and another script to change the desktop...
Customization
Robocopy backup for personal folders
I have created a batch file for copying my Documents folder to an external hard drive: The log file shows that it is backing up C:\users\USERNAME\documents\My Music and C:\users\USERNAME\documents\My Pictures. That's fine, because I want those backed up anyway, but when I go to...
Backup and Restore
I Need Help To Create REG. Script With Admin. Priv. For Reg. Editor?
Hello. I have a technical question/issue I wish to ask. I hope someone can help me. I am looking help for someone to modify or rewrite for me a simple system registry script for my context menu that allows or forces to "run as administrator" privileges automatically when I click on the...
Customization
Anyone use robocopy to backup?
Evening all, Just curious to know if anyone uses the built in utility to backup software on your machine, im trying to backup my itunes folder to an external HD but having a few issues to get this to work properly! I also use sync toy for backing up but just really want to know what everyone...
Backup and Restore


Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd

All times are GMT -5. The time now is 04:59.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App