Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

shawnveltman's avatar

Easy Incremental DB Backup on Forge?

Hey all,

Is there any support for incremental database backup "out of the box" on Forge or within the Laravel ecosystem?

I've got a ~5GB DB that Forge is compressing down to 1.5GB, and it's taking about 5 minutes to stream it up to S3. Previously, I'd used the Spatie backup package, which took about as long, but compressed it down to ~650MB. I like the Forge baked in "streaming to s3" option, but I don't like that it's taking so long & producing such big files every hour.

I'd love to be able to have a base backup, then grab backups of the incremental changes hourly, but before I start diving into doing it manually I figured I'd check to see if there are any first-party options or packages that make the process easy. :)

Thanks!

0 likes
3 replies
shawnveltman's avatar
shawnveltman
OP
Best Answer
Level 3

As usual, the answer to my question lived in a course I bought years ago but hadn't gone through....

Chris Fideo's course on MySQL backups from 2019 has some great info on this, and a strategy that I'll be attempting to put into place over the next few days.

In essence, enabling database binlogs, then setting up a 2nd server to act as a replication database but just grabbing/storing the binlogs.

  1. Do full database backup periodically using the master_data=2 to store current binlog position
  2. Store binlogs, and if needed backup from latest backup + binlogs after the position noted in Step 1

Lots of setup required, but that course is the way to go for this... It makes sense that there's no "simple" package that deals with it, given that you've got to update settings & have admin access to the folders to see/grab the binlogs (OR have a separate server & db user set up to grab/store the binlogs).

1 like

Please or to participate in this conversation.