Jump to content

☁️ Duplicator: Backup and move sites


flydev

Recommended Posts

So, after multiple tries to code a function which could zip a folder and could lead to be extracted on both platforms (win/unix) failed. The function I built (which I think can work on both platforms) lead to a ZipArchive error: NO ERROR on Windows and thus the zip file is not finalized ??

it irks me, if someone has a function which work on both platform please post it here ✌️

 

Link to comment
Share on other sites

50 minutes ago, flydev said:

So, after multiple tries to code a function which could zip a folder and could lead to be extracted on both platforms (win/unix) failed. The function I built (which I think can work on both platforms) lead to a ZipArchive error: NO ERROR on Windows and thus the zip file is not finalized ??

it irks me, if someone has a function which work on both platform please post it here ✌️

 

I haven't been following the zip conversation closely but don't ProcessWire's inbuilt functions not work? wireZipFile() has never failed me and more lately $files->zip(). I've just tried the following (example from the Docs) on my local Windows machine (EDIT: not  a Windows Server though!) and remote linux machine and $files->zip() worked without errors (nested folders; PW 3.x):

 

// Create zip of all files in directory $dir to file $zip
$dir = $config->paths->cache . "my-files/";
$zip = $config->paths->cache . "my-file.zip";
$result = $files->zip($zip, $dir);

echo "<h3>These files were added to the ZIP:</h3>";
foreach($result['files'] as $file) {
  echo "<li>" . $sanitizer->entities($file) . "</li>";
}

if(count($result['errors'])) {
  echo "<h3>There were errors:</h3>";
  foreach($result['errors'] as $error) {
    echo "<li>" . $sanitizer->entities($error) . "</li>";
  }
}

 

Edited by kongondo
windows not windows server!
  • Like 1
Link to comment
Share on other sites

Yes, but there is a feature to exclude files by extension - not tested a wildcard in the core function - which can't work "as is" with this function.

 

Maybe I should return an array of all files (from an extension provided) and passing this array to the function. This should work.

Link to comment
Share on other sites

3 minutes ago, flydev said:

Maybe I should return an array of all files (from an extension provided) and passing this array to the function. This should work.

I think it would work. $files->($zip, array|string $files)

  • Like 2
Link to comment
Share on other sites

26 minutes ago, flydev said:

Okay, thanks @kongondo, you put me on the right track. The zip file can be extracted on Windows and Unix :)

Glad that part work.

27 minutes ago, flydev said:

....but the "extension feature" doesn't work.  Will find a workaround.

Hmm. Doesn't work on both OS?

Link to comment
Share on other sites

hi @flydev

I didn't follow the whole thread. Maybe you want to have a look at https://doc.nette.org/en/2.4/finder and https://doc.nette.org/en/2.4/filesystem; Maybe this makes things easier :)

You could also have a look at Soma's online installer: https://raw.githubusercontent.com/somatonic/PWOnlineInstaller/master/grabpw.php (this is in use for a long time and should be tested on all systems).

 

  • Like 1
Link to comment
Share on other sites

I'm getting the error below

Quote

Warning: filesize(): stat failed for /home/floriann/public_html/site/assets/logs/duplicator.txt in /home/floriann/public_html/wire/core/FileLog.php on line 225

Warning: filesize(): stat failed for /home/floriann/public_html/site/assets/logs/duplicator.txt in /home/floriann/public_html/wire/core/FileLog.php on line 225

Warning: filesize(): stat failed for /home/floriann/public_html/site/assets/logs/duplicator.txt in /home/floriann/public_html/wire/core/FileLog.php on line 237

Warning: file(/home/floriann/public_html/site/assets/logs/duplicator.txt): failed to open stream: No such file or directory in /home/floriann/public_html/wire/core/FileLog.php on line 238

The mention of filesize is odd because this site is a 1 page holding page with 4 medium images. Other than that it's the usual 3.0.96 files.

This is on a server which I don't have complete control over. Otherwise I'd get you better server info.

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

Hello,

the module got updated, please upgrade it to version 1.1.9.

This version contain some small fixes, the major fix is that packages can be built/extracted on Windows and/or Unix platforms and the exclusion feature still work as expected.

Apart from that, I am working on the GoogleDrive feature; It look like that the AmazonS3 feature need an update. Dropbox v2 planned for soon.

 

@adrian I found (another or maybe this is what you was talking about ?) confusing thing with GoogleDrive. Duplicator can store 10 packages in GoogleDrive and delete the older keeping the newer but without differencing packages built on distinct websites. In the current state of the module, when he get files from Google Drive, all packages are threated as "one (1) website".

 

Edited by flydev
Amazon still working
  • Like 2
Link to comment
Share on other sites

20 minutes ago, flydev said:

@adrian I found (another or maybe this is what you was talking about ?) confusing thing with GoogleDrive. Duplicator can store 10 packages in GoogleDrive and delete the older keeping the newer but without differencing packages built on distinct websites. In the current state of the module, when he get files from Google Drive, all packages are threated as "one (1) website".

Sorry @flydev - I don't quite follow what you are saying there, but to clarify what I am seeing - once it hit's 10 packages for one site, none are deleted, so no more are uploaded unless I manually delete some.

  • Like 1
Link to comment
Share on other sites

Cool! I forgot to say that the Dropbox API installation is only supported trough Composer. I will see if I got the time to make a "standalone SDK".

 

Also I don't know if people here already heard about of the cloud backup solution for professional, iDrive. Our company is a long time customer of their services and we never had an issue. They have military grade security implemented on backups. I was not going to promote their service as I trough they had only paid plans, but finally they have a free plan of 5Gb. I would like to say that there are no more reason to not have a professional backup solution for your client !

It will be implemented in Duplicator very soon as I need it quickly! ?

 

  • Like 3
  • Thanks 1
Link to comment
Share on other sites

45 minutes ago, flydev said:

Also I don't know if people here already heard about of the cloud backup solution for professional, iDrive.

 

Started using iDrive after CrashPlan announced the end of their Consumer plans. Not a bad product at all and they often have great discounts on the Macworld newsletters. 

I'm a bit of a backup junkie and have been through (or am still using)

  • Syncplicity
  • Sugar Sync
  • Crash Plan
  • DropBox
  • Google Drive
  • Amazon Backup Drive
  • Amazon S3 storage
  • oDrive
    and probably more

However realising this is a ridiculous setup I am going to consolidate soon :)

Just discovered a really nice app called pCloud recently and it works a little different. It creates a virtual cloud drive on your machine so that any files you put in there don't take up space on your local machine. Worth a look as the Apps and website based account ar every nicely done. As much as I like iDrive and others, some of the interfaces are awful. iDrive looks like something from the 90s.

  • Like 1
Link to comment
Share on other sites

6 minutes ago, Peter Knight said:

iDrive looks like something from the 90s.

I lol'd, thanks.

Yes sure, but its robust! Like ProcessWire and his 90s homepage ? They work on features, no time for frontend fashion things!

  • Like 2
Link to comment
Share on other sites

On 4/10/2018 at 9:51 AM, szabesz said:

Sounds great! I think I will give it a test drive, however, I cannot find its features listed:

https://www.idrive.com/pricing

Do they mean that the Free plan is exactly the same as Personal except the difference in storage limit?

If you're considering a paid plan, there's 90% off for the first year here

https://www.idrive.com/idrive/signup/el/macworld90

That's not my affiliate link but probably MacWorlds

  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...