Open pdewouters opened 10 years ago
Files are already restored if they unzipped the backup and uploaded all the files
Probably better to upload a zip and unzip on the server
When restoring from a script file with no access to WordPress, then obviously we can't depend on core functions. For example copy_dir
- we'll still need to write our own
When restoring from a script file with no access to WordPress
Good call!
This is a large undertaking, the very definition of an Epic. We need to figure out a way to take small steps in right direction. Also, restoration isn't a single thing. Users might want to just restore a single file. They might want to just roll the database back, they might still have access to the site and want to go there to initiate a restore or they might no longer have access and need to restore to a fresh server. We need to identify each of those scenarios, break them down, tackle the easiest ones and slowly work towards a point where we have a robust restore solution.
Once we have those two then we shouldn't be too far away from being able to completely roll a site back to a previous backup state from within the site itself.
Another consideration, can we enable undo so that users whom accidently restore to the wrong backup can get back to where they were (we probably can).
The ability to automatically restore a site from a BackUpWordPress backup.
There are two parts to this:
In the first case we should have the option to restore just the database/files/both.
In the second case, we'll need an restore.php file inside the backup, the restore process will then be:
The magic restore process will need to:
1. Restore the database
We'd ideally support importing via both
mysqldump
ifCLI
access is available, falling back to a PHP import if not, the PHP import will likely need to handle chunking the import so it can handle importing large databases.2. Restore the files
We can probably just use the built in WordPress
unzip
functions for unzipping.I broke this into smaller parts: