Back up your Homestead Files

So you are interested in backing up your files incase of a crash? Easy enough. How many back ups are you going to make? Where are you going to store them? How are you going to store them? What are you trying to save your files from? An internal (your computer) system crash, or a Homestead Server crash?

These are questions you need to ask yourself. I will give you some professional hints to the answers... but like anything in this world, nothing is concrete.

Here's a break down:
1. How many back ups are you going to make?
The backup minimum is 2, but 3 is a standard used in the programming industry
2. Where are you going to store them?
You should keep two backed up on your computer and one somewhere else like a flash drive.
3. How are you going to store them?
I'll do my best to explain. but you need to be comfortable doing the backing up. Not me. So ask questions if you have any.

Before you start:
What you need to do is set up a "dummy" folder outside of the Homestead folder with other folders inside to properly store your files. Make this file somewhere you will remember where it is, but out of harms way. Name is something like "Backup_original filename_" or "Secondary_original filename_".

I made my new folder to backup my site on my desktop and named it "backup youdonkey".

Fun Programmers Tip:
This will help you later on... just in case you need it. Keep the Homestead file window partly open so it shows up only 1/2 the screen, and the new folder open so it shows 1/2 the window, (half and half) so you can quickly toggle between the Homestead folder and the new backup folder. Plus it's easier than closing and opening windows all the time.

Step 1:
Locate your Homestead files - they are located on your Hard Drive. here's the path:
C: Drive >> Program Files >> Homestead >> Homestead LPX >> Data >> User >> Sites

The web site names will look something like this:

_12345678_ = the original file name which is numbers. Your backup file should look like = backup_12345678_

Inside "sites" is your pages and your graphics... all in their respective folders, but all located in this central location.

Step 2:
Copy and paste each file you see from the original folder to the new folder. Keep copying and pasting till everything is moved.

Step 3:
Now that each file is now in the "backup" file, rename them. THIS IS VERY IMPORTANT!! REREAD THIS MANY TIMES SO YOU KNOW EXACTLY WHAT YOU ARE DOING!! THIS IS SERIOUS NOW!! Rename your files by adding a letter in the name. This letter should be something you will remember that it doesn't belong.

Your file name looks something like:
index.hc and the other looks like index.xpf

change them to something like this:
and the other looks like Xindex.xpf

See the difference? Now if something happened on Homestead's side (server crash), all you have to do is remove the letter X and copy and paste back in to proper Homestead folder.

Why do you have to rename your files? Because you could screw up your system. If there are two file names the same, you computer/ program won't know what to do. So it is important to do this step, and do it with out removing the original names. These original names LPX needs to tell the sites/ files a part. Once you loose these names... it's game over. Your hard work is gone for good.

These directions could change when (or if) Homestead creates a new sitebuilder or changes the files names. This will still be helpful though. The basics will be the same no matter the new file names.

No comments:

Post a Comment