First off, welcome to the wide world of Magento! Here's a great article with details on different ways to backup Magento that give a good breakdown for a lot of this. The article is geared towards a running server setup but mostly the same rules apply for your local MAMP setup. A lot of pertinent information can be found there.
If I disable the Apache and MySQL servers would it then be enough to copy the entirety of > the MAMP folder and Magento folder to offsite storage periodically?
No need to disable Apache / MySQL. You can backup Magento with everything running. Essentially Magento will either 1) make changes to files or 2) make changes to the database. Most backup methods for the files (drag / drop files to backup, use shell commands like cp
or rsync
, etc.) will work fine if files are actively being modified such as the var/cache
within Magento. The only thing that will happen is maybe at the time of copying the version you have is slightly older because it was updated right after you copied it.
Do I need to create exports of the database using PHPMyAdmin in addition to step 1?
As for MySQL, you should use the mysqldump
command (more details in the blog article link above). This will have MySQL do the backup for you so no need to worry about actively using the database. The only concern is that it can add load to the host computer during backup that could slow things down but it shouldn't crash anything. You could also use PHPMyAdmin to do your backup without it crashing / harming anything (again might just slow it down).
Should I also create and then download System and Database/Media backups from inside the >Magento back-end?
Depends. If you're comfortable using command line to move, copy, rsync etc. files then I would skip the Magento backup manager. It can sometimes have issues and be a bit slower. You could use it but not needed in addition to regular backup methods.
Before backing up the entire Magento store, do I need to disable things such as indexing, >the cache, or put the store in maintenance-mode first? What impact (if any) is there when >backing up a database that is possibly in use?
No no and no. You're fine to backup an active running site. The only thing you could do to maybe save yourself a step later would be to either entirely flush the Magento cache storage before backup or just exclude the var/cache/ directory from your backups. It's automatically regenerated upon using Magento either from the Admin or front end.
As for the DB performance, again it can impact performance but that depends entirely on the size of the database and your hardware. If the site is just in dev it's likely a small database (unless you have tens of thousands of products).
Lastly, I installed the Magento folder inside of the MAMP applications folder (at the >direction of a well reviewed Magento development book). Are there any other files or >folders outside of MAMP that I should be backing up? (The database is located in: ?>Applications\MAMP\db\mysql).
I haven't used MAMP much but as for Magento it really consists of 1) the files and 2) the database. Unless it's like some of those goofy installation tools chances are all the Magento files are contained within 1 directory. If that's the case, just making a backup of that directory and then a backup of the database would be enough. Apache configs, tuned mysql settings, etc. are all a different story but with the files and database you could then re-install or setup that Magento site elsewhere (either on your MAMP or deploy to a server, etc.)
And as already stated, GIT is always nice ;)
Follow the steps:
1) Download it as a zip into any folder of your machine. Unzip it into your local directory. Not in the directory where you have your magento installed.
2) Login to your server via shell.
3) Switch to the directory whcih you just unzipped i.e code-migration-develop by using
cd "/path-to-/code-migration-develop"
4) Run command following command in root directory of this folder
composer install
5) Let the composer do its job. Then switch to bin directory under code-migration-develop.
Command: cd bin
6)Now execute:
php migrate.php migrateModuleStructure /path-to-your-magento1.x-installation /path-to-your-magento2.0-installation
It will convert the structure and you will see these converted structure in
code-migration-develop/app/code
7) Next step:
php migrate.php convertLayout /path-to-your-magento2.0-installation-directory
8) Run
php migrate.php convertPhpCode /path-to-your-magento1.x-installation /path-to-your-magento2.0-installation
That's it.
Note that during this last step, you might have lots of warnings.
That is, because, the code migration cannot do everything on it's own.
Some manual work still needs to be done.
These warnings are logged in a log file /code-migration-develop/var/migration.log.
Hope it helps in your case!
Best Answer
So, let’s begin. First of all, I assume that you wish to start with fresh project and that you’ll be doing only back-end programming. This is important because I’ll set up repository only for /app/code/local/ folder. It will keep the repository lightweight and enough for this practical example. At the end, I’ll explain .gitignore file so that you can make modifications to folders you wish to include.
Preparing Git locally
There are two steps you must go through before you start working with Git:
To get started, you need to install Git on your machine – you can find instructions by going on this page. Next thing you need to do is to find yourself a Git repository that you’ll use for your projects. For this example, I used free private repository located .
Registering (and auto-configuring) of Git repository is extremely simple with gitfarm.appspot.com
Adding Magento files to Git repository
Now, when you have your repository ready, all we need to do is add our files to it. In my example, I’ll add only 1 Magento directory (/app/code/local/) I accomplished that with following commands:
“workspace”
directory“repository_name”
and if you see .git directory inside it, copy your Magento project inside itNow, that wasn’t so hard you should agree. At the moment if you followed these few steps, you have your first Magento Git repository ready for work.
At the moment, anyone with repository location (and password in case of gifarm) can repeat steps 1. , 2. ,5. and 6. and do his/hers share on the project.
Notes:
If you haven’t used gitfarm.appspot.com as your repository, steps 2 and 6 might differ (depending of repository setup) if you’ve used any private repository, you will have to authenticate via password or ssh key (depending on setup) – when promited in any of the steps You can add more than one directory to your Git repository by repeating step 4 with different location (all files and folders under that directory will be added) .gitignore and Magento
.gitignore is Git file that contains a list of files/folders that you wish to keep untracked on repository itself. So, on Magento, as in any other project those are files and folders that depend on your local setup like downloader/, errors/, config.xml,… and so on.