sarah,
@sarah@phpc.social avatar

What do you use for offsite backups for applications and databases?

sarah,
@sarah@phpc.social avatar

Thanks to everyone who replied.

I’m looking for something that can basically export the db to sql and upload it to offsite backup storage. #php

mwop,
@mwop@phpc.social avatar

@sarah I have a recurring job that (a) runs pgdump, and then (b) uses logrotate to rotate backups and expire old archives. This runs on a mounted s3fuse volume, which gives me backup to, in my case, DO spaces.

willpower232,
@willpower232@phpc.social avatar

@mwop oh that's clever, I keep forgetting about fuse, are you using this one? https://github.com/s3fs-fuse/s3fs-fuse?tab=readme-ov-file

mwop,
@mwop@phpc.social avatar

@willpower232 Yes, within a container, via elementary/s3-volume (https://github.com/elementar/docker-s3-volume).

michael,
@michael@thms.uk avatar

@sarah SnapShooter. Works great imo and very reasonably priced.

ghostwriter,
@ghostwriter@phpc.social avatar

backup

docker exec -t {app}postgres pg_dumpall -c -U postgres > backupdate +%Y-%m-%d"_"%H_%M_%S.sql

upload to s3

aws s3 cp ./backups/ s3://backups/ --recursive --exclude * --include backup_*.sql


download from s3

aws s3 cp s3://backups/backups_xyz.sql /backup.sql

restore

cat backup.sql | docker exec -i {app}_postgres psql -U postgres

Skoop,
@Skoop@phpc.social avatar

@sarah containers in production, digital ocean spaces for uploaded files and managed databases

pcambra,
@pcambra@drupal.community avatar

@sarah do you mean for storage? s3 or alike, wasabi for example

j3j5,
@j3j5@hachyderm.io avatar

@sarah I may be out of date here but I've been reliably using duplicity for the past +10 years and it's always worked great

https://duplicity.us/

  • All
  • Subscribed
  • Moderated
  • Favorites
  • php
  • kavyap
  • InstantRegret
  • ethstaker
  • DreamBathrooms
  • mdbf
  • magazineikmin
  • thenastyranch
  • Youngstown
  • tacticalgear
  • slotface
  • Durango
  • khanakhh
  • rosin
  • everett
  • Leos
  • vwfavf
  • normalnudes
  • osvaldo12
  • cubers
  • GTA5RPClips
  • cisconetworking
  • ngwrru68w68
  • anitta
  • provamag3
  • tester
  • modclub
  • megavids
  • JUstTest
  • All magazines