Skip to main content
2 votes

How do I restore a site from backup

If you've copied the Craft files to a new place on the server, then you can either leave the database connection information the same and have it keep on pointing to the current database instance, or ...
Brad Bell's user avatar
  • 67.5k
2 votes
Accepted

Craft 3 Database Backup

Craft uses MySQL's native mysqldump and PostgreSQL's pg_dump binaries to create database backups. In order for PHP to be able to execute those binaries, it needs to be able to run the proc_open and ...
Brad Bell's user avatar
  • 67.5k
2 votes

Back-up doesn't work in Craft CMS 3 on MAMP locally

I have just run into a similar problem. I'm not sure if this is what fixed it but try creating an Envvars file as per jonlivingstone's comment here https://github.com/craftcms/cms/issues/2364 Once I ...
foamcow's user avatar
  • 2,029
2 votes

Can't backup DB locally with MAMP PRO 5.5.1

I have run the following on my computer in order to allow Mac OS's terminal to speak to MAMP's MySQL. I have not done the steps outlined in your linked article. Craft's built-in backup tool works fine ...
Evan Warner's user avatar
2 votes

Craft backup "mysqldump: not found..."

Your server seems to be missing the shell command mysqldump, contact your IT-Specialist and tell him you need that to be installed you can backup your website. Or if you plan on installing it ...
Campiotti's user avatar
  • 313
1 vote
Accepted

Deleted rows from elements_sites hunting stray slugs now I can't login

I'll post how I've begun to fix this. Since I couldn't login, I assume there was entries I removed from elements_sites relating to my user account. I did a query to see what elements I had that were ...
Robert's user avatar
  • 53
1 vote
Accepted

Database backup fails

The database backup from Craft is slightly different to the SQL export in phpMyAdmin. Craft’s export (presumably) assumes you’re going to want to import that data into an existing site, whereas ...
mitrol's user avatar
  • 262
1 vote
Accepted

Enupal Backup not backing up assets

Glad to know that it is working on your server. On Windows, you may need to add the paths manually. Please follow our docs about how to add the paths on Windows.
Andre L.'s user avatar
  • 357
1 vote
Accepted

Download database in gzip

Nope, the UtilitiesController is hard-coded to use .zip: $zip = new ZipArchive(); if ($zip->open($zipPath, ZipArchive::CREATE) !== true) { throw new Exception('Cannot ...
andrew.welch's user avatar
  • 11.6k
1 vote

Craft CMS 3 - Manual database backup

When you do your export in phpmyadmin, make sure you check the 'disable foreign key checks' box in the custom options:
Seb's user avatar
  • 197
1 vote
Accepted

ERROR: relation "assetindexdata_id_seq" already exists on new database

Not sure how the database backup was created and what's being used to restore it, but using this would fix the error: CREATE SEQUENCE IF NOT EXISTS 'public.assetindexdata_id_seq' Alternatively, if ...
Brad Bell's user avatar
  • 67.5k
1 vote
Accepted

Can't Backup Database - "Failed with exit code 1" (WAMP Server)

Following up on your last comment: So I guess my final question is: how can I either manually create the required file (which is missing) or amend the query? You can completely override Craft's ...
Brad Bell's user avatar
  • 67.5k
1 vote
Accepted

Import database backup when using docker

You can expose a port on your mariadb service then upload your backup using Sequel Pro or Workbench. Don't forget to add the restart:always to the service.
bshelling's user avatar
  • 111
1 vote

Import database backup when using docker

Partial solution - I removed all backups except the most recent from the backups folder. It seems that changing the site name prevented the site from finding the correct sql file or adding new ...
Paddy Dewhurst's user avatar
1 vote

Is there a way to clear old database files from storage|backups folder automatically?

******* Updated based on khalwat's comment ************ I don't think Craft does that automatically. Not sure about 3rd party plugins. I wrote a custom controller function to run by Cron Job, and it'...
Wei's user avatar
  • 459
1 vote

DB back-up gives syntax errors on import in new DB

As Brad replied as a comment, the issue was indeed PhPMyAdmin. Using NaviCat or updating my PhPMyAdmin resolved the issue. Answer points go to Brad!
Tom De Smet's user avatar
  • 1,456

Only top scored, non community-wiki answers of a minimum length are eligible