helloswish / craft-db-dump

A simple way to perform database backups in Craft CMS.
MIT License
4 stars 1 forks source link

No backup is being saved #1

Closed bartrylant closed 2 years ago

bartrylant commented 4 years ago

Installed everything as it should. Tried making a backup with the url first. It takes some time (10-20 second), then I see: Success. Removed 0 old backups

However, there is no backup in the backup folder (on S3).

PHP version | 7.3.8 Craft edition & version | Craft Pro 3.3.19 DB Dump | 3.0.1

bartrylant commented 4 years ago

-- Sorry, my mistake. Everything works fine.

bartrylant commented 4 years ago

After looking into it again, it is not fine. Backups are created, but they stay in the temp upload folder (in my case, that folder is also on S3). They are not moved to the asset folder I selected in the plugin settings.

chadcrowell commented 4 years ago

Sorry for the trouble. Are you able to successfully upload a file to this asset volume using the GUI in the assets section of the control panel?

bartrylant commented 4 years ago

Yes I can.

chadcrowell commented 4 years ago

Ok. Do you have the ability to set your temp folder back to the default location and test a backup? If so let me know if it still fails or succeeds.

Chad

On Jan 4, 2020, at 1:40 PM, Bart Rylant notifications@github.com wrote:

 Yes I can.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

bartrylant commented 4 years ago

That doesn't make a change. Here's the weird thing: all the backups I've made until now are also in the folder storage/backups. The temp folder contains only the last 3 (as I've set in the settings). The "final destination" folder contains nothing.

bartrylant commented 4 years ago

The backups in storage/backups keep piling up. And still no luck with moving them to a S3 bucket...

chadcrowell commented 4 years ago

Sorry for the delay Bart - I'm quite busy with client work right now. I'll try to find some time to look at it this week. For the record, I checked last week and I also have backups being deposited into and remaining in storage/backups... I'll be looking into that as well as your temp folder issue.

chadcrowell commented 4 years ago

Hi Bart... working through this to fix your issue.

First things first, I've released v3.0.2 which now appropriately removes the initial backups that are saved in storage/backups before they are moved to the temp and final locations.

I worked on a local repo with this plugin installed to try to replicate your issue with backups being saved in the temp location and never being moved to the final location. I changed temp folder location to an S3 volume (in this case, my backups folder with a /temp subfolder). In my testing with that setup, nothing is ever left in the temp folder, and the backups are always saved to the final folder. I deployed the new version to the production version of the same site, changed the temp folder to an S3 volume, and it also worked as expected.

So, I think there is still something to be figured out. Maybe its an environment issue with your particular setup. For now, can you update the plugin and try it and let me know what happens?

bartrylant commented 4 years ago

Hi

I've updated the plugin. Backups are still in the (S3) temp folder, and not being moved to the final S3 folder. Could you post a (blurred) screenshot of your temp volume and backup volume settings page?

Also, the first time I ran db dump after the update, it deleted the old files from the temp folder so there were only 3 sql files in the temp folder. However, I've ran the script a few times again, and the sql files keep piling up again.

Is there a way to check in the database which volume is being used to save backups? I don't see a db-dump table in the database, so where are those values being stored?

chadcrowell commented 4 years ago

Hi Bart - I didn't think that anything I did yesterday would fix your initial issue. Can you confirm that backups aren't remaining in the storage/backups folder? That should definitely be fixed.

Here are my backup S3 volume settings: https://d.pr/i/MgUu98 Temp folder settings: https://d.pr/i/ZAnjRf

I don't know where Craft stores plugin settings. They aren't in craft_plugins. DB Dump uses out of the box plugin settings functions based on the Craft plugin docs.

bartrylant commented 4 years ago

Hmmm, those settings look the same as my settings, so that cannot be the problem.

I can confirm no new backups have been stored in storage/backups since the update.