8

Please, share your website backup strategies and practices - I have a simple php/mysql webapp and files don't actually have any backup other than the fact that they're also saved in a dropbox, and for DB I have a cron job that will export it daily and send it to my email.

How do you do it? How large are sites/app that you're backing up?

Comments
  • 0
    📌
  • 2
    Code is stored in github, dbs server has a snapshot taken daily and stored in a S3 bucket.

    For the non cloud servers, a snapshot of the entire VM is taken daily and stored on network drive.

    At worst you’ll loose a day, however binlogs will fill in most of the gaps for the DBS.
  • 0
    Files are stored locally, on a USB stick, on the regular disk images and on my company PC as backup. I just upload the stuff to my hosting company.
  • 2
    I don't run any websites, but for my mailers I'm going for a shared storage server that just contains /var/vmail, mounted to both the internet servers through a VPN connection. Not sure what networked filesystem abstraction I'll be going with yet, but probably sshfs or NFS. And btrfs on the actual VM's filesystem as usual. Then from there it should be possible to back up with just a cron job containing some rsync commands. Or due to the textual nature of emails, maybe even git.
  • 1
    I've moved most stuff to containers (I know, I'm that guy), but it's really more about separating the code from the content, so that I have something like /srv/database for database storage, /srv/content for dynamic site content (uploads etc), and /srv/specs with server configuration (where to fetch code from, config files, dependencies for cloud init, anything I may need to set up the server from scratch).

    That way I can just back up that folder with something like restic (works with most cloud storage providers, like backblaze, s3, sftp, ...)
  • 1
    @hitko in that case consider putting each of those in their own partitions or better yet, in their own btrfs subvolumes if you haven't done so already. That way they're neatly separated.
Add Comment