# Backup Win / Dos script



## gnappi (Mar 14, 2019)

All my professional and personal life I've been using RAID, as well as cloned drives, and daily a backup script to keep my ~120 gigs of 
personal files safe from system related problems. 

For operating system level backup I use drive cloning monthly or less frequently if no software her been updated, but daily I use a Win/Dos backup script / batch file I wrote to copy and maintain an up to date backup of my data.

I developed this file many years ago while working at IBM and a RAID development lab to quickly make off line backups of data that is irreplaceable. 

If anyone on this board feels they have an inadequate (or worse still non existent) backup plan, AND has some familiarity with DOS level scripting PM me and I will either email the file or attach it to a reply here, the text file is rather small.


----------



## gnappi (Mar 14, 2019)

Here's a screenshot of it.


----------



## LDUBS (Mar 15, 2019)

Well, I barely understand, but do have a question. Where do the backed up files reside? 

I use a MacBook so this Windows/DOS script is not likely to help me. Currently I back up to iCloud. An issue I have is that it is a snapshot backup instead of a vault, so to speak. For example if I delete photos from my MacBook, they are deleted from the cloud. I want something that will save photos I want to keep even if I clear them from my MacBook or iPhone. 

I guess I need an external storage device that will allow me to pick and choose files I might want save or retrieve.


----------



## gnappi (Mar 15, 2019)

LDUBS said:


> Well, I barely understand, but do have a question. Where do the backed up files reside?
> 
> I use a MacBook so this Windows/DOS script is not likely to help me. Currently I back up to iCloud. An issue I have is that it is a snapshot backup instead of a vault, so to speak. For example if I delete photos from my MacBook, they are deleted from the cloud. I want something that will save photos I want to keep even if I clear them from my MacBook or iPhone.
> 
> I guess I need an external storage device that will allow me to pick and choose files I might want save or retrieve.



Sorry, Macs aren't likely a candidate unless you can get a Mac/DOS emulator that supports NTFS on an external drive to work with it. But in your case I'd STRONGLY recommend that you organize your personal files in one location / folder and drag said folder regularly to an external drive for safekeeping.

This script will back up to any drive mappable under Windows, whether it's a rotating SATA, SSD or thumb drive, fixed in the system or removable it doesn't care. You should also be able to use a mapped rewriteable CD that hasn't been closed / locked for write. But, I have not tested it. As of this date, Android phones no longer allow the user to map an internal disk on the phone to a Windows drive so copies to a phone must be made via drag and drop.

This script also doesn't care about drive coherency meaning if you delete files on your PC they are not deleted on the backup EVER. You have to delete them yourself as I do not lock copied files for write / erase.

Here's an example of typical use:

Hard drive files:

My document 1 (changed / updated)
My document 2 (deleted)
My document 3 (unchanged)

Backup drive files:

My document 1 (updated by date/time)
My document 2 (retained...not deleted)
My document 3 (unchanged)

PS, It will NOT write anything to the C: drive other than two small text files to keep track of the last backup date as well as a temporary file that disallows running two instances of the same script simultaneously. That is unless the person who receives it changes it do so something like (shudder) restore files.


----------



## el_cheapo (Mar 20, 2019)

gnappi said:


> All my professional and personal life I've been using RAID, as well as cloned drives, and daily a backup script to keep my ~120 gigs of
> personal files safe from system related problems.
> 
> For operating system level backup I use drive cloning monthly or less frequently if no software her been updated, but daily I use a Win/Dos backup script / batch file I wrote to copy and maintain an up to date backup of my data.
> ...




I feel like there is going to be an incredibly small percentage of people that have familiarity with DOS scripting/batch files and also have inadequate backups, AND are concerned about it. It's kind of like asking how many master mechanics don't change, or have their oil changed in their own vehicles. 

That being said there's a ton of free, even open source software out there that's going to be less intimidating/more user friendly for the average computer user. I wish I could remember the particular one I'm using at home to make incremental backups daily.


----------



## Ebug (Mar 21, 2019)

Thank you for making this post. Lord knows I have had my share of hard drive failures over the years that have led to precious data loss.

I have not programmed DOS since the early 80's so I would need a serious refresher course to get this implemented.

Is the amount of work required beyond the scope of creating a tutorial?

I know I would be willing to compensate your time to a degree for the effort.

Sideline question on data backup. How safe is cloud based storage in general? After my most recent forced Windows re-install I started uploading some of my hobby files to Google Drive but do not trust any of my personal data up there.

Thank you 
RobT

Sent from my SAMSUNG-SM-G900A using Tapatalk


----------



## LDUBS (Mar 21, 2019)

gnappi said:


> But in your case I'd STRONGLY recommend that you organize your personal files in one location / folder and drag said folder regularly to an external drive for safekeeping.



I was at Costco the other day with Mrs Ldubs. Saw this and confirmed it is compatible with my version of OS. I think my storage size needs are relatively small compared to most. Would something like this be a good candidate for an external drive? 

I feel like a dinosaur when it comes to this stuff. Thanks again for sharing and helping. 

Larry

Edit -- forgot the pic (oops!)


----------



## el_cheapo (Mar 25, 2019)

LDUBS said:


> gnappi said:
> 
> 
> > But in your case I'd STRONGLY recommend that you organize your personal files in one location / folder and drag said folder regularly to an external drive for safekeeping.
> ...



5 Terabytes is actually pretty huge, I would be shocked if you needed more and also were not aware that you had tons of data. To put it in practical terms the common unit of measurement programs use/ we see files described as is in MB, a fair quality photo is probably in the 1.5 MB range, text files, excel sheets, general documents are typically less. So if you put 1,048,576 MB together it's considered a Terabyte. That drive will store five of those. 

2 Hours of high quality video (1080 p) is about 4 Gigabytes, there are 1024 gigabytes in a Terabyte, so even if you have a bunch of movies ripped to your PC or home videos you're still likely good.


----------



## LDUBS (Mar 25, 2019)

el_cheapo said:


> 5 Terabytes is actually pretty huge, I would be shocked if you needed more and also were not aware that you had tons of data. To put it in practical terms the common unit of measurement programs use/ we see files described as is in MB, a fair quality photo is probably in the 1.5 MB range, text files, excel sheets, general documents are typically less. So if you put 1,048,576 MB together it's considered a Terabyte. That drive will store five of those.
> 
> 2 Hours of high quality video (1080 p) is about 4 Gigabytes, there are 1024 gigabytes in a Terabyte, so even if you have a bunch of movies ripped to your PC or home videos you're still likely good.



Thanks. This really helps. My photos are all from a cell phone and reduced to small sizes. Don't have any large video or movie files and otherwise just a random assortment of doc's, spreadsheets, and PDF's. Sounds like this product will more than meet my needs.


----------



## el_cheapo (Mar 25, 2019)

LDUBS said:


> el_cheapo said:
> 
> 
> > 5 Terabytes is actually pretty huge, I would be shocked if you needed more and also were not aware that you had tons of data. To put it in practical terms the common unit of measurement programs use/ we see files described as is in MB, a fair quality photo is probably in the 1.5 MB range, text files, excel sheets, general documents are typically less. So if you put 1,048,576 MB together it's considered a Terabyte. That drive will store five of those.
> ...




The backup software that comes with it probably isn't too bad, if it tells you it's a trail or wants to ask for credit card info let me know and I'll look into the freebies, there's too much good software out there for free at this point to bother paying for one. 

Or you could just drag and drop your files every week or so, and either write over the old ones or make a new folder every week and eventually delete the oldest ones, that's basically what these softwares are doing. It's just if it's not on an automated timer we tend to forget ourselves.


----------



## el_cheapo (Mar 25, 2019)

Ebug said:


> Thank you for making this post. Lord knows I have had my share of hard drive failures over the years that have led to precious data loss.
> 
> I have not programmed DOS since the early 80's so I would need a serious refresher course to get this implemented.
> 
> ...



Semi safe, google themselves undoubtedly has your data on a server with raid meaning every file is on multiple hard drives so if one dies they just pop it out and replace it, then it recreates the raid. They also would have an offsite backup of that so basically the same thing in 2 places seperated geographically. THEY will never lose your data.

But they may cut your access to it at some point beyond your control. Generally only heard of this happening if you store copywrited material with them (ebooks music movies etc.) but they don't owe you anything and we can't see what they'll do in the future.


----------



## gnappi (Mar 26, 2019)

Ebug said:


> Thank you for making this post. Lord knows I have had my share of hard drive failures over the years that have led to precious data loss.
> 
> I have not programmed DOS since the early 80's so I would need a serious refresher course to get this implemented.
> 
> ...



Cloud backup is pretty safe from destruction / loss, how safe it is from eyes who may have access to the encryption algorithms I cannot say. 

From what I know about most if not all cloud storage, they adhere to strict data coherency, meaning if you delete at home or work, the cloud deletes it too. A script does not delete ANY files... EVER, it only overwrites files with the SAME name if changed and files with NEW names and content. 

At any rate, the script modification is not beyond most peoples' ability to locate their data, read and use MS notepad and save a file. MANY people are using it, not only in jobs I left but in online forums I am on and most learned to use it proficiently with no previous scripting knowledge. 

The script has a help file with suggestions on how to organize your hard drive and modify and use the script.

To answer some previous comments...

Drag and drop CAN be used, that is* IF it's used which in my experience it often is not*. It WILL be S-L-O-W as it overwrites everything (which is as it SHOULD be) to keep files up to date. Also drag and drop does not tell you when your last backup took place.

*I feel like there is going to be an incredibly small percentage of people that have familiarity with DOS scripting/batch files and also have inadequate backups, AND are concerned about it. It's kind of like asking how many master mechanics don't change, or have their oil changed in their own vehicles. *

You are right, and there is copy backup software on the web, most if not all come written in compiled code, which as a former programmer I do not trust in my machines. My script is almost idiotically simple to understand but frighteningly complicated for someone not really familiar with scripting to gen up from scratch, as it has a number of error checking processes and being menu driven it's impossible to screw up.

Additionally if anyone cared to read the whole thing, they would get a VERY good understanding on how it works in its entirety. There's no secret code, no out links, no access to anything the user did not strong type themselves. 

Only THREE things need to be known:

1. Where your stuff is
2. Where you want it to go.

Both easily found out using the file explorer (not Windows Internet explorer)

3. How to use a simple text editor like notepad. 

I do not think that's too difficult. If it is, then so is the TV remote. 

In the below help example taken from this operational script, it's fairly straightforward and definitely not rocket science. 
It basically says (from the help file) ... 

copy from-source:to destination and switches (shown empty here) you do not modify

xcopy c:\my_stuff h:\my_stuff\ / / / / / 

Use it or not. I've NEVER, EVER lost a single byte of data, and so you know, I was on the original development teams at IBM on the PC so it goes back a VERY L-O-N-G way on too many industrial, commercial, school and personal machines to put a number on.

If anyone is interested, PM me for the text file.


----------



## gnappi (Mar 26, 2019)

LDUBS said:


> gnappi said:
> 
> 
> > But in your case I'd STRONGLY recommend that you organize your personal files in one location / folder and drag said folder regularly to an external drive for safekeeping.
> ...



5 TB??? F-I-V-E???

Maybe I can put that in perspective...

I'd consider myself more than a somewhat advanced user of PC's. I have family pics, movies, code written from past jobs, a decent collection of my ripped CD's, a number of mpeg files and have used only 106 gigabytes, barely over 12% of my one TB (931 gigs usable after formatting and O/S overhead) I'd say 5 TB will cover you and likely the storage of EVERY porn site on the planet in their entirety also


----------



## LDUBS (Mar 27, 2019)

Well, this sure sounds like overkill for what I need. It looks like I can get an equivalent 1 TB external drive for half the price of this one.

El_Cheapo -- according to the Seagate description, the backup software is included.

Thanks everyone for the help.


----------



## el_cheapo (Mar 27, 2019)

gnappi said:


> LDUBS said:
> 
> 
> > gnappi said:
> ...




I think you're severely underestimating the amount of porn, and size of high quality video that's in existence. 4k video (becoming more popular in all types of recordings) takes 360 GB an hour. that's 13.8 hours per 5 tb. My collection of movies (nothing explicit) audiobooks, Console ROMS and PC games is taking up 12 TB and I'm looking into more drives.

Don't get me wrong 5 tb is probably overkill for the guy we're trying to help but 5tb is not that crazy nowadays. There's a reason it's for sale at a retail store. There was a time when people were getting 10 MB hard drives and thinking geez how will i EVER fill this. 10 MB sounds laughable now.


----------



## gnappi (Mar 27, 2019)

el_cheapo said:


> I think you're severely underestimating the amount of porn, and size of high quality video that's in existence. 4k video (becoming more popular in all types of recordings) takes 360 GB an hour. that's 13.8 hours per 5 tb. My collection of movies (nothing explicit) audiobooks, Console ROMS and PC games is taking up 12 TB and I'm looking into more drives.
> 
> Don't get me wrong 5 tb is probably overkill for the guy we're trying to help but 5tb is not that crazy nowadays. There's a reason it's for sale at a retail store. There was a time when people were getting 10 MB hard drives and thinking geez how will i EVER fill this. 10 MB sounds laughable now.



*E freakin gads, can't someone make a comment without somebody postulating an opinion contrary to what was tongue in cheek and CLEARLY not directed to one of a "VERY few" self appointed power users?* 

LISTEN UP, anyone can stuff 5TB drive with crapenzola, but 5TB "PROBABLY" overkill? You're on such thin ice (or a porn collector) your comments are just too silly. They sell 350 horsepower cars too does that mean EVERY such car USES ALL 350 horse power?

I WAS there when 5 MEGABYTE drives were released, in the labs working on them, but the O/S and applications grew exponentially beyond 10,20 or 50 meg drives to where we are today, which BTW, my MAIN drive STILL only occupies 150 gigs... O/S data and everything else.

But... we're talking DATA backup here, not monstrous operating systems, and I stand by this comment...ANYONE who NEEDS 5TB isn't mom and pop, or hundreds of millions of users that LOSE DATA, not movies, or porn.


----------



## LDUBS (Mar 28, 2019)

Whoa. I didn't understand your original reference to porn files and wondered why you said it. I knew it was incorrect. I sure didn't realize it was a joke. Someone calls you on it and you get defensive - I get it. But to accuse them of being a porn user to get even isn't right in my opinion. Maybe like me, the poster didn't understand your were making a joke. 

Too bad about the fuss, because before your last post I was finding this thread useful.


----------



## gnappi (Mar 28, 2019)

LDUBS said:


> Whoa. I didn't understand your original reference to porn files and wondered why you said it. I knew it was incorrect. I sure didn't realize it was a joke. Someone calls you on it and you get defensive - I get it. But to accuse them of being a porn user to get even isn't right in my opinion. Maybe like me, the poster didn't understand your were making a joke.
> 
> Too bad about the fuss, because before your last post I was finding this thread useful.



I wasn't defensive I was pushing back on comments that were made that were inappropriate for the casual user like yourself, and even advanced users like me. I never said anyone was a porn collector, I suggested that porn and movies are reasons for huge drives.


----------



## AnglerRoy (Mar 28, 2019)

I won’t get into the earlier fuss...whatever. 2,3,5TB drives would be more useful for “casual” data storage if you were implementing a real backup strategy with long-term full, incremental and differential backup schedules. To the majority of folks, they’d never go down this route, so yes, 5TB is a bit overkill. To more advanced users, 5TB isn’t excessive.

Yes the OP has a valid point that drives get bigger each year, it’s the way it is.

Ones data is whatever they want to keep. It’s nobody’s business what that data is, the size of it or what they do with it. You simply buy a drive for the capacity you need, and plan for the future.


----------



## el_cheapo (Mar 28, 2019)

Guess I'm on "thin ice" wonder what happens when I fall through?


----------



## gnappi (Mar 30, 2019)

el_cheapo said:


> Guess I'm on "thin ice" wonder what happens when I fall through?




Your drive crashes?


----------



## gnappi (Mar 30, 2019)

AnglerRoy said:


> I won’t get into the earlier fuss...whatever. 2,3,5TB drives would be more useful for “casual” data storage if you were implementing a real backup strategy with long-term full, incremental and differential backup schedules. To the majority of folks, they’d never go down this route, so yes, 5TB is a bit overkill. To more advanced users, 5TB isn’t excessive.
> 
> Yes the OP has a valid point that drives get bigger each year, it’s the way it is.
> 
> Ones data is whatever they want to keep. It’s nobody’s business what that data is, the size of it or what they do with it. You simply buy a drive for the capacity you need, and plan for the future.



I never said it was a "full" backup, it's for DATA. I can duplicate my Linux, and Windows drives in 5 minutes or less with a clone, or in an hour from DVD, but data I can keep on Waaayyyy less than a 256 gig drive. 

At any rate, no skin off my nose who uses it. 

Here's a recent user's comments:

I tried it today. I had to modify it a bit and have to run it as admin under windows 8. I ran it as a .bat file.

I am very great full to you for sharing this program! I have tried to use back-up software before but stopped using them due to the software not working properly.

I finally have a back-up copy!!! I love the simplicity of your program. You are very kind to share it with others!

I am ashamed to say I work in the tech industry and have not payed too much attention to back-ups at home. As you said these things fail when you least expect it.

Thank you again!!!


----------



## AnglerRoy (Mar 30, 2019)

By nature, it is a full backup dude. You’re copying everything, that has changed based on your log file and skipping files that haven’t, but more or less a full backup if I recall your programming logic (i admit I did not go back and reread your post). A “full” backup doesn’t have to equate to backing up everything, it just means backing up everything you have specified as a source. I won’t dwell on the fundamentals of back-up terms any longer as the majority of the target audience most likely won’t understand.

In actuality, I guess your script could be considered an overwriting incremental backup if you want to get technical.

I think it’s great you shared it, but if “good” data gets corrupted and therefor modified, one would be trashing their good backup with bad data (because it’s been modified). Especially if the target drive is permanently connected like most folks probably would do, case in point, a crypto virus. 

Hence, my mentioning of skipping the use of your application and using a real backup strategy if someone really wants to protect their info. But, as you are probably aware, even a backup drive with a complete backup schedule, permanently connected, would get corrupted by a crypto virus as well.

I’m not trying to trash your efforts, I just don’t really agree of leading people on that they’re fully protected by using your code. Yes, it’s a duplication and that never hurts, but once you overwrite that good data, there’s no going back...at least, with a simple script like the one you provided.


----------



## gnappi (Apr 2, 2019)

AnglerRoy said:


> By nature, it is a full backup dude.
> 
> I’m not trying to trash your efforts, I just don’t really agree of leading people on that they’re fully protected by using your code. Yes, it’s a duplication and that never hurts, but once you overwrite that good data, there’s no going back...at least, with a simple script like the one you provided.



If you bothered to read my original post, which it appears you did not...

"If anyone on this board feels they have an inadequate (or worse still non existent) backup plan, AND has some familiarity with DOS level scripting PM me and I will either email the file or attach it to a reply here, the text file is rather small."

I continued to say their DATA is backed up, THEY change it, how many iterations should THEY keep before backing up? YMMV, Rant on you seem to relish it."


----------



## LDUBS (Apr 4, 2019)

gnappi said:


> I wasn't defensive I was pushing back on comments that were made that were inappropriate for the casual user like yourself, and even advanced users like me. I never said anyone was a porn collector, I suggested that porn and movies are reasons for huge drives.



Yeah, I think I used a poor choice of words.


----------



## earl60446 (Apr 7, 2019)

Thanks for the script Gary


----------



## gnappi (Apr 13, 2019)

" there’s no going back...at least, with a simple script like the one you provided."

I rarely attack people but you make it tempting 

My script is over 600 lines, no mean feat for a non compiled piece that has no compiler / build / make machine to catch errors and help debug. 

What you and others with an agenda fail to see in my case is that I have people who have absolutely NO BACKUP plan at all for their kids pics, wedding movies, all stuff that will likely never change. Add stuff to as new fish are caught? Yes. Go back? To what? Tell me one single thing that having EVERYTHING a person accumulates on a machine over years, maybe even through two or more machine crashes is needing to "go back" to? An old unchanged file? An over written file? Handling stepping versions is no responsibility of backup software never was, never will be, that's the owner's responsibility.

Here's a note from a fellow who lost most EVERYTHING, because he had no backup plan... THEN had the temerity to blame the techs for not being able to restore what he lost after the crash. 

*Now the bad part ....most of you know my computer crashed ...finally got it back a few days ago ....they did a lousy job ....I lost lots of files , pictures ...name it ....*

I bet he wished he had a "simple" backup plan in use well before the crash.


----------

