Options to backup and restore complete server?

Discussion in 'General' started by lonerunner, Mar 4, 2021.

  1. lonerunner

    lonerunner Member

    I want to ask what are the options and ways you guys use to backup and restore complete server, complete os, everything from hard drive?

    Let's say i have a dedicated server at hosting x and i want to backup everything on weekly or daily basis in case of hardware failure or if something goes wrong when updating.

    I am thinking of using either rsync or bacula and i want to backup everything to another server or to my pc. There is no option to make a snapshot or backup entire ssd/partition at hosting level so i have to do it my self.

    So far i've been using rsync to do backups of user files like /var/www/clients folders and it's simple and easy to backup and restore files that most often do not change, but doing complete server backup with rsync ? Is it doable, is it easy or complicated, i guess i definitely need to avoid backing up swap, tmp, proc folders?

    I didn't use bacula yet but i find it as a possible solution.
    What do you recommend or use ?
     
  2. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    I don't. My systems run as virtual machines, which I can back up as snapshots. But even if one of those systems crashes and it is unrecoverable, I have a backup of the configuration files and the data. All I have to do is set up a new server and restore it.
     
    Ravi Shanker likes this.
  3. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    I use BackupPC, available from Debian and Ubuntu repositories. My servers are virtual machines in Proxmox host, and Proxmox takes nightly dumps of the virtual disks.
     
    ahrasis likes this.
  4. Ravi Shanker

    Ravi Shanker Member

    The number of snapshots allowed on my account is only one and that expires in 30 days... from the date of its creation... what could be other option so that snapshot lasts as long as we need
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    That's a limitation of your hosting company and not a limitation of snapshots in general or ISPConfig. Ask your hosting company why they do not provide permanent snapshots or use a different hosting company to run your virtual server.
     
  6. lonerunner

    lonerunner Member

    When you have limitations like this on hosting company you have to look at alternative options like I do or other hosting companies. So far best I found for my backups is to use rsync, i wrote small bash script which make backups on daily and weekly cron and also on manual request. Arch wiki have very good article https://wiki.archlinux.org/index.php/rsync#Installation I started from there and extended it per my needs.
     
    Ravi Shanker likes this.
  7. atle

    atle Member HowtoForge Supporter

    Regarding ISPConfig configuration files and data (except db), what need to be back-upped, in order to restore ISPConfig?
     
  8. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    All settings are stored in the database.
     
  9. atle

    atle Member HowtoForge Supporter

    So like /etc/apache2 does not need to be backed? It will be rebuilt?
     
  10. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    You were asking about ISPConfig configuration itself, and all ISPConfig related settings are in the database.
    But yes, the Apache vhosts can be rebuild from the database. Zone files as well. But data from the /var folder should be backed up by the admin and is ofcourse not saved in the ISPConfig DB. And if you customized settings for Apache, Postfix, etc, this is not saved in the DB either of course.
     
  11. atle

    atle Member HowtoForge Supporter

    How do I initiate the rebuild? Its a lot that need to be rebuild.
     
  12. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    I do not recommend the following way. It is much better to often create snapshot and backups.
    You could import the ISPConfig DB, then log in to the panel and do a resync of the sites or zones under Tools -> Resync.
     
  13. atle

    atle Member HowtoForge Supporter

    Agree, but there is a delta between the snapshot and the regular file backup. We always shut down the server for snapshots, hence they are not very frequent. Anyway, we do file backup on /root, /etc and most under /var, and all databases. Assume that is enough to make a decent restore. Like restore the snapshot, restore db's, restore /root, /etc and what we have in /var from file backups.
     
  14. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    You might add /usr/local/ispconfig in your backup list.

    Note as you don't have a question pertaining to the "howto" tutorials, I'm moving this thread to a forum for ISPConfig issues.
     
  15. till

    till Super Moderator Staff Member ISPConfig Developer

    To fully restore an ISPConfig system, you need:

    /var/www
    /var/vmail
    /etc
    /var/log/ispconfig (optional, if you want to keep log history)
    And all ISPConfig databases.
     
    rbartz likes this.
  16. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    also, depending on the tutorial you used to originally install the server, and possibly multiple versions of php, along with other possible software like ispprotect, bandaemon etc. you may also want to backup /opt as well.
     
  17. atle

    atle Member HowtoForge Supporter

    Well, I always use your auto-install script now, its excellent.
    I guess /root also is good, since acme amongst other reside there.
     
    Th0m likes this.

Share This Page