Complete restore can leave the site half-restored
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 20/100
Línea de trabajo
The issue describes restore behavior in the file-copy and EventSource request paths, but names no source files or tests. Read the restore implementation and inspect the open pull request #251 to understand the proposed fix. Done means the running BackWPup version remains in place and the copy finishes after the browser leaves the page.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Describe the bug
Two ways a complete restore leaves a mix of old and restored files:
- The backup's BackWPup replaces the running plugin. The file step copies
wp-content/plugins/backwpupfrom the backup over the plugin running the restore. The database step and the cleanup then run the backup's (often older) code, so fixes in the installed version are not used. - Leaving the restore page aborts the copy. The file copy runs in one EventSource request without
ignore_user_abort. Following a link, closing the tab or dismissing an admin notice via its link makes PHP abort the copy halfway.
To Reproduce
- Install a newer BackWPup than the one in the backup and start a complete restore. After the file step,
wp-content/plugins/backwpup/backwpup.phphas the backup's version. - On a site with All-In-One WP Security's firewall (loaded via
auto_prepend_file), restore a backup containing a different AIOS version and leave the page while "Restoring: Directories" is running.
Observed
For case 2, the restore log stops mid-way and every request, including / and the restore page, fails with:
PHP Fatal error: Trait "AIOWPS\Firewall\File_Prefix_Trait" not found
AIOS' new config.php was copied, but the libs/traits/ folder it needs was still queued. The restore can't be resumed from the browser.
Expected behavior
The restore keeps the running BackWPup plugin and finishes the copy even if the browser leaves the page.
System
- BackWPup 5.7.8 (restore code shared with 4.x)
- PHP 8.3, MariaDB, All-In-One WP Security with firewall enabled
A fix is ready as a pull request.
- Lenguaje dominante
- PHP
- Estrellas
- 96
- Forks
- 48
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de wp-media/backwpup
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
-
S3 backup list times are shifted by the site's UTC offset (timezone offset applied twice)Quizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
-
WordPress XML export: posts have no categories or tags since 5.6.6Posiblemente ocupada @rafaelmaeuer la tomó hace 14 días. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 25/100
-
Complete restore stops after the file step: user is logged out, database is not restoredPosiblemente ocupada @rafaelmaeuer la tomó hace 14 días. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
-
Database restore loses data when a row is larger than max_allowed_packetPosiblemente ocupada @rafaelmaeuer la tomó hace 14 días. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
Todos los issues de wp-media/backwpup
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 3 días
-
sync-en
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Los mantenedores suelen responder en 1 día
-
[Sync EN] Formatting improvements to "Large Objects (LOBs)" docs (#6056)Posiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertosync-en
Dificultad 1/5 Menos de una hora Aptitud para principiantes 74/100
Los mantenedores suelen responder en 1 día
-
Перевод устарел
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
Los mantenedores suelen responder en 1 día
-
repo:cms
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
craftcms/cms#20613 · 1 comentario ·
Los mantenedores suelen responder en 1 día