Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Mal

macrumors 603
Original poster
Jan 6, 2002
6,252
18
Orlando
So this is kinda random, but I had to share my story.

Today I was working on one of the sites that I run (nothing serious, just for a small group), and I just needed to change a word in the menu that displays across all the pages in the site. I use a php include for it, so I pulled up Espresso, opened head.inc, made the change real quick, and hit save.

Then gaped at the results.

As it turned out, I had previously been doing all my editing on the remote file, not the local one, and the local file was about 4 years old. This time, however, I had opened that (old) local file, changed the word... and then uploaded it to the website, automatically overwriting the newer remote file.

Since the time that file was created, I had completely reworked the entire menu, moving to a horizontal drop-down system instead of a vertical static menu, and many of the actual links had changed within the menu as well. I now had a menu that was breaking the design of the site rather significantly, as well as containing several broken links, and it was live on the site!

Now, I have a Time Machine backup at home, but of course, since I hadn't been syncing all my changes, it would only have the backups of the old file, not the one that had been live on the site for about 2 years.

All is lost, right? I'm gonna have to recreate all my changes?

Nope.

I remembered having played around with the Wayback Machine some time ago, so I headed over to waybackmachine.org, pulled up the latest version they had of my site (from 2007, but it hasn't changed since then anyways, until today), hit "View Source", and copied and pasted my menu back from the code there. I then made the proper change (again), uploaded the file, and viola! Back in working order.

Just thought I'd share this little bit of success, since it made me feel good.

EDIT: Lesson learned, btw. I am currently downloading the live version of the site and will retain multiple backups of everything involved.

jW
 

angelwatt

Moderator emeritus
Aug 16, 2005
7,852
9
USA
I had a similar experience with a programming class where I accidentally backed up the old file over the new. Very bad. For my sites I keep them in SVN so I can always get back at older versions, and the SVN repository is backed up as just in case. The need for backups is always a tough lesson to learn. Good thinking with the way back machine. Google cache can also be helpful sometimes.
 

brisbaneguy29

macrumors 6502
Nov 27, 2007
370
1
Brisbane
Glad to hear it all worked out for you. Nice job thinking of the way back machine. If it ever happens again, I just thought I would also point out that most web hosts keep a weekly backup, and usually for a small fee, they can restore any file form the previous week.

Of course this only works if you don't wait longer than a week to ask for the restore, but I thought I would just throw it out there as info for your readers.
 

Mal

macrumors 603
Original poster
Jan 6, 2002
6,252
18
Orlando
Yeah, my host provides that option, but I hadn't enabled it. :rolleyes: Yep, that's how careless I was being. I've got my own backups now as well as the automated backups.

jW
 

ChicoWeb

macrumors 65816
Aug 16, 2004
1,120
0
California
You also may want to think about offsite backups for your server(s). I have our servers backed up every night, week, and month so I can always have my admin access the files we overwrote....Which happens more times then I'd like to admit.
 

Mal

macrumors 603
Original poster
Jan 6, 2002
6,252
18
Orlando
You also may want to think about offsite backups for your server(s). I have our servers backed up every night, week, and month so I can always have my admin access the files we overwrote....Which happens more times then I'd like to admit.

If it was a more critical site, I'd probably consider that. In this case, I could just start over and redo it if necessary, being down for a week or more wouldn't really matter much right now (our access logs are impressively sparse). It'd probably even be good if I did. I just didn't want to right then.

jW
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.