Asking suggestion about Backup Strategy.

Discussion in 'General' started by Nyx_, Jan 4, 2022.

Tags:
  1. Nyx_

    Nyx_ Member HowtoForge Supporter

    Hi Folks. Good day.

    I'm wondering what can be considered good backup strategy for a daily (or maybe each 6 hours) backup of the complete ISPConfig, ideally from the live server.
    I'd like to minimize the restore time in case of incident, so, I'd like to include the DNS, SSL certs, Website Files, permissions, Users, Passwords, Email Boxes, settings, etc.

    What are the directories/files of interest? What about the Databases?

    What Backup and Restore procedure can I use to have a decent DR Plan when using ISPConfig3?

    Appreciate your ideas/comments.

    Thank you.
     
  2. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    There are a lot of options for backups. For backups that frequently I would probably look at what you can do from the filesystem or device level, and that of course depends on your filesystem type and layout and/or your hosting setup (usually vps). Doing backups of all data can take a while when your server starts getting a lot of sites, so see what options you have for incremental or differential backups. For the restore process, make sure you have something that fits your experience level as a server admin.

    As a concrete example, around here we are running ispconfig nodes in proxmox vms, and for your description of backups needs I would set a backup schedule to backup to a proxmox backup server (backs up only changed data at the vm block level, and deduplicates data so backing up the same vm repeatedly doesn't multiply the space required not the time to back up).
     
  3. Nyx_

    Nyx_ Member HowtoForge Supporter

    HI @Jesse Norell Thanks for your reply.
    I'm running ISPConfig on a real hardware. Doing Filesystem snapshots will required the hardware to be booted from a different filesystem, which will cause downtime and it's a lot of work as it's a manual process.
    Is there a way to backup and restore the whole ISPConfig configuration?
    I was thinking more on the line of backing up the whole DB and copying the files/directories needed. Question is, I don't know what will be the list of files/directories that needs to be copied. Appreciate if someone more experienced that I on it can help.
    Thank you.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    You need this for restoring an ISPConfig installation or moving it to a different server:

    1) All MySQL databases (e.g. dump them with mysqldump and then back up the .sql files)
    2) The whole /etc directory
    3) If you want to keep logs (e.g. website logs), you need /var/log too.
    4) The websites are normally in /var/www unless you have chosen to move them
    5) Email data is in /var/vmail
    6) If you use acme.sh for SSL certs, then backup /root/.acme.sh too

    There is a backup script, which might give you some further insights: https://www.howtoforge.com/community/threads/ispconfig-3-back-res-a-backup-and-restore-script.41609/
    B I have not used it personally as I run all my systems virtualized and I do snapshot backups of the virtual machines.
     
  5. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    What filesystem do you use? The filesystems I have used which support snapshots (namely, btrfs and zfs) do not require anything to be offline.

    In addition to the list @till posted, you should back up /usr/local/ispconfig/ if you plan to restore a full working server from the backup (with the possible exception that you never customize anything, you could probably install a base ispconfig system and change MySQL passwords later to match your restored data).
     
  6. Nyx_

    Nyx_ Member HowtoForge Supporter

    Hi. Thanks for the replies.
    @Jesse Norell: I'm using a SBC with Armbian and EXT4 filesystem. I'm investigating the options of switching to one of these fs.
    @till: Thanks for the updates. I'll see if I can implement it here and post comments/questions.
    Thank you.
     

Share This Page