Jump to content

How do you properly Backup Prestashop?


Recommended Posts

I have so many issues.  None of the payment options work, I can't go into maintenance mode because when you do and leave the page suddenly nothing can be accessed and it says there is no webservice.  I can't figure out how to fix that so I always have to restore the VM from a snapshot. I just want to start over but I wasted hours listing items in the store, I want to back that up so I don't have to do it again.  I looked into doing a backup.  It appears it's as simple as copying the entire root directory of the website over to the new server and exporting the database through phpmyadmin and then importing it on the other server.  I am a windows user that is barely learning how to use linux and I'm using Ubuntu 20.04.  Zip looked too confusing to use through the CLI to me so I use a program called peazip.  Peazip freezes at 77%  The directory is 1.8 gigs and zip can only get to 1.1 gigs before it freezes.  I have tons of ram on this server and 8 gb is on this particular vm.

I have no host I can contact. This is all running off of a bare metal server a friend gave me and it's sitting on a dresser in the other room. It's on ESXi 6.7 and the website is running on a VM of Ubuntu 20.04.  The storage is a Synology NAS.  Since this is all local, can  I skip zipping all together and just FTP the entire directory to a backup folder on the NAS and just FTP it back to the new server?  I think zip is running into files with permission issues and freezing.

When I did the export of the database in phpmyadmin it created a very small file very quickly.  Are all the photos and everything I uploaded in the prestashop directory and the database is just text referencing where everything is?  I.E.  Will I have a database to import on the new system if this file that was created is only 4k in size?

 

Once everything is backed up, what all do I need to test as working before I backup?  I put in all this time only to find out that something is broken on the install now, so I can't go into maintenance mode or the webservice breaks, and so many things need you to go into maintenance.  Payments are not working.  Does adding modules break other functions of the website?  I.E.  Should I just install the payment modules right away on a fresh install and try a test purchase before doing anything else?  Then if that works, restore the backup?  If I do and the payments don't work again, how do you troubleshoot that?  Turn off each module individually one by one and test purchase each time?

 

 

Link to comment
Share on other sites

vor 2 Stunden schrieb Zohaib-fk:

A good web hosting with daily backup and automatic restore using the 1 click feature saves time and difficulties in restoring the website when something goes wrong.

This is the fastest and easiest solution, but in addition you should also copy the backup to a different place which is not you server or hoster. I remember the fire from French OVH host wich caused severe damages to businesses that did not have backups at alternative places.

Link to comment
Share on other sites

Moving it to a host is the plan, I just want to know how to back this up so I know how to move things around if I want to change URLs.  Plus I can do this for free while I learn, but I wouldn't want to run an actual ecommerce site from home, the server hogs too much power and I shut it down when it rains because of bad past experiences with electronics years ago.  That's not reliable place to put something that is supposed to be up 24/7.  When I was reading about how to backup it looked like it should be easy.  Basically take the entire root directory for the website and zip it so you can do a 1 file transfer over FTP and export the database using phpmyadmin. Then use those files on the new server and importing that database in phpmyadmin on the new server.

I re-installed it on a new vm and the maintenance tab is working again, it doesn't kill a webservice.  Things look good so far.  I have the demo files installed just for testing, it won't show the images and if you click on any of the listings it will say the URL can't be found.  I know this has to do with SSL because I had this issue before and when I turned off ssl and went to the localhost on port 80 the images started working again.  If I turn ssl back on and go to localhost on the vm the images and links were broken.  On this particular install I can't replicate this because the browsers keep redirecting to https so I can't verify if this problem is the same as it was on the other vm.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...