Comments (6)
Hey @cu12,
Have you tried to swap out the implementation for get_tmp_dir()
? Did it helped you?
from unyson-backups-extension.
hey @andreiglingeanu
Indeed, dumbly modifying the function like this, makes this working
public function get_tmp_dir() {
return get_temp_dir() . '/tmp';
}
it's a good idea to use the canonical function anyway.
from unyson-backups-extension.
That's true, but I'm not entirely sure why that method was implemented that way in the first place. I'll have to look it up before swaping out the implementation.
from unyson-backups-extension.
This function return path to folder fw-backup/tmp dir created in folder uploads this is not the same as default get_temp_dir() directly in tmp this is added and for another reasons it can be rewritten from config.php param dirs.destination, some plugins are badly programmed by deleting all of that folder it results that it will delete and your backup( plugins what works with downloaded files cache etc but not only plugins touch this folder).
@cu12 can you check this function what path returns wp_upload_dir I think here is the problem.
from unyson-backups-extension.
@ViorelEremia thanks for working on this, the function returns something like the following:
Array
(
[path] => /var/www/wp-content/uploads/2017/11
[url] => redacted
[subdir] => /2017/11
[basedir] => /var/www/wp-content/uploads
[baseurl] => redacted
[error] =>
)
Now the problem is not the path, but the filesystem behind it which is Gluster used via NFS. After the download finishes, it's not guaranteed that it's already been fsync'd to the filesystem, therefore an immediate read could end up in a "bad" zip file.
Making the download defaulting in /tmp
would almost all the time guarantee that extraction would succeed right after the download as in 99% of the cases it's not a network filesystem.
from unyson-backups-extension.
I do not think I have to focus on this issue, and I do not know how to do this so as not to affect the others so if you find a solution create a pull request.
from unyson-backups-extension.
Related Issues (20)
- Export custom folder HOT 6
- Database Restore, case sensitive table name HOT 1
- Unspecified ajax error ( Backups 2.0.23 ) HOT 7
- theme_mods name replace HOT 1
- Canot make full backup because of installed plugin
- Disable donations HOT 6
- Can we do flush rewrite rules on demo content installation complete? HOT 2
- Full Backup fails, Content backup ok HOT 1
- HTTP to HTTPS replace during demo content install
- Backup stuck at "Directory cleanup" HOT 2
- Backup Extension plugin HOT 1
- Array and string offset access syntax with curly braces is no longer supported in PHP 7.4+
- "Cannot create temporary directory" Error on my AWS Virtual Server when Installing Demo and Content Extension HOT 1
- Loopback in the code
- curl connection timeout both in unyson-backup-extension and normal unyson HOT 5
- Duplicate foreign key constraint name 'fk_wp_wc_download_log_permission_id'
- PHP 8.x Images sizes issue with demo import
- Failed to create tmp table _fwbk_wp_actionscheduler_actions.
- How to restore
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from unyson-backups-extension.