Code Monkey home page Code Monkey logo

Comments (12)

willmot avatar willmot commented on July 29, 2024

We can with zip archive and pclzip. Not with zip command.

from backupwordpress.

willmot avatar willmot commented on July 29, 2024

Looks like getting progress info from zip should be possible too, see popen and passthrough

from backupwordpress.

willmot avatar willmot commented on July 29, 2024

We can with zip archive and pclzip.

To track progress here we should add another key to the backup status array that is stored as a JSON string in the .backup_running file.

Then During the ZipArchive and PclZip loops we can simply periodically write the number of files added to the backup status, we should probably do it every 100 files or so and see what effect that has on performance.

We could similarly add progress to the php mysqldump fallback method, however database backups are generally so quick it's probably lower priority.

Once we have it working for ZipArchive and PclZip we can look at doing it for zip.

from backupwordpress.

pdewouters avatar pdewouters commented on July 29, 2024

Looks like zip --verbose could help here.

  Verbose mode or print diagnostic version info.

              Normally, when applied to real operations, this  option  enables
              the  display of a progress indicator during compression (see -dd
              for more on dots) and requests  verbose  diagnostic  info  about
              zipfile structure oddities.

              However,  when -v is the only command line argument a diagnostic
              screen is printed instead.  This should now work even if  stdout
              is redirected to a file, allowing easy saving of the information
              for sending with bug reports to Info-ZIP.   The  version  screen
              provides  the help screen header with program name, version, and
              release date, some pointers to the Info-ZIP home  and  distribu-
              tion  sites,  and shows information about the target environment
              (compiler type and version, OS version, compilation date and the
              enabled optional features used to create the zip executable).

Maybe the different archive methods should have their own class, so we can handle their particularities separately

from backupwordpress.

willmot avatar willmot commented on July 29, 2024

Not sure how we'd stream that progress back to PHP though.

from backupwordpress.

pdewouters avatar pdewouters commented on July 29, 2024

with proc_open ?

from backupwordpress.

willmot avatar willmot commented on July 29, 2024

Nice! That would mean we could correctly check whether the backup process was still actually running and properly cancel it

http://php.net/proc_open

from backupwordpress.

pdewouters avatar pdewouters commented on July 29, 2024

this would be epic

from backupwordpress.

pdewouters avatar pdewouters commented on July 29, 2024

Actually, I will use ProcessBuilder http://symfony.com/doc/current/components/process.html

from backupwordpress.

willmot avatar willmot commented on July 29, 2024

Since switching to Process in #1001 we can now get access to progress: http://symfony.com/doc/current/components/process.html#getting-real-time-process-output

from backupwordpress.

libby-barker avatar libby-barker commented on July 29, 2024

@willmot and @pdewouters is this issue still active following merge of #1001 ? If so, what are the actionable tasks here?

from backupwordpress.

willmot avatar willmot commented on July 29, 2024

Yep still an issue. We don't present meaningful progress to the user currently, just a spinner and basic status message (backing up files etc).

Ideally we'd show more detailed progress so that users can see how long the backup is expected to take and how far through the process currently is.

from backupwordpress.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.