Complete restore can leave the site half-restored

Aperta
#247 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

@rafaelmaeuer ci sta già lavorando.

Dal 29/10/2026.

  • #251 di @rafaelmaeuer — aperta

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
20/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
php, wordpress
Ambito
backend, devtools

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Describe the bug
Two ways a complete restore leaves a mix of old and restored files:

  1. The backup's BackWPup replaces the running plugin. The file step copies wp-content/plugins/backwpup from 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.
  2. 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

  1. Install a newer BackWPup than the one in the backup and start a complete restore. After the file step, wp-content/plugins/backwpup/backwpup.php has the backup's version.
  2. 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.

Lingua principale
PHP
Stelle
96
Fork
48
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di wp-media/backwpup

Tutte le issue di wp-media/backwpup

Issue simili

Altre issue su PHP

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.