Avatar of Rio Reiser
Rio Reiser

asked on 

How to backup root server with online shop

Hi,
how can I backup my entire root server (UBUNTU 16)? It is hosted at MITTWALD. It is installed and configured (MAGENTO shop), now I want to backup the whole server with the possibility to restore it easily. I am not sure what is the best way to do this and I hope to get some good ideas.
Info: From the hosters console it is not possible to create backups.

Thank you!
Magento

Avatar of undefined
Last Comment
David Favor
ASKER CERTIFIED SOLUTION
Avatar of David Favor
David Favor
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of Rio Reiser
Rio Reiser

ASKER

ahh thanks seems to be simple. Anyway:
- Do I use the "debian.cnf" also with UBUNTU?
- When zipping, do I also include permissions?
- How to restore the files?

I appreciate your help!
Avatar of David Favor
David Favor
Flag of United States of America image

Yes, use /etc/mysql/debian.cnf with Ubuntu.

Zip includes permissions + drops all ACLs/XATTRs, so if you use many complex ACLs, likely best to use tar -Ipixz instead of zip.

To restore, use unzip for .zip files + tar -xf for tar files.

You're welcome!
Avatar of Rio Reiser
Rio Reiser

ASKER

Brilliant thank you David.
Just one question left: How do I best restore the database?

Thanks in advance!
Avatar of David Favor
David Favor
Flag of United States of America image

You're welcome.

To restore a database...

1) Create an empty database, remember to create correct GRANTs based on your database version (see your docs).

2) Then use your choice of load commands. I usually use pv, as I like to ensure I see the progress of a database load.

Using pv you can quickly see problems. For example, I once had a WordPress database using the Pretty Links plugin (shudder) + load time estimate was 40+ hours.

pv your.sql | mysql --defaults-extra-file=/etc/mysql/debian.cnf --default-character-set=utf8 your-empty-database

Open in new window


Enjoy!
Avatar of Rio Reiser
Rio Reiser

ASKER

Thank you David
Avatar of Rio Reiser
Rio Reiser

ASKER

Very helpful
Avatar of David Favor
David Favor
Flag of United States of America image

You're welcome!
Magento
Magento

Magento is an open-source e-commerce platform written in PHP for e-commerce web sites. Magento employs the MySQL/MariaDB relational database management system, the PHP programming language, and elements of the Zend Framework. It applies the conventions of object-oriented programming and model–view–controller architecture. Magento also uses the entity–attribute–value model to store data.

321
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo