Remote Backups

Discussion in 'Feature Requests' started by João Varanda, Aug 24, 2018.

Tags:
  1. João Varanda

    João Varanda New Member

    Hello,
    I think it's a good idea implement the option to backup all data to another server remotely (FTP, OneDrive, Google Drive, Dropbox, etc...).
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    That's already possible, ISPConfig can run a shell script to mount a backup drive when needed.
     
    Last edited: May 5, 2021
    ahrasis likes this.
  3. João Varanda

    João Varanda New Member

    But in doing so, it will be on the server itself.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    No, it won't be on the server when you mount an FTP, NFS, SMB or any other kind of network drive share.
     
    ahrasis likes this.
  5. João Varanda

    João Varanda New Member

    I'll need to know how this works best.
    Thank you.
     
  6. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    ISPConfig backs up to a directory, which by default is usually on a local filesystem/device. To store the backups on a remote server/service, you create a script which mounts the remote server/service on the directory where your backups are made, and create another script which unmounts that directory, then enable the server config option for the backup directory being a mount point. The specific commands needed depends on what type of remote mount you are setting up. There have been examples posted to the forums here, or see the manual.
     
    ahrasis likes this.
  7. Stelios

    Stelios Active Member HowtoForge Supporter

    or you can mount permanently the /var/backup directory to a remote NFS etc via fstab?
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Sure, that's no problem as well.
     
  9. Stelios

    Stelios Active Member HowtoForge Supporter

    @till on a multi-server setup if I mount the /var/backup to remote storage would it save all backups there from all servers (email, web, db)?
    Of course, I will have to enable the backup option for all Sites. Does it need to enable backup from elsewhere?
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    This folder is used for all backups.
     
  11. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    The directory path is configured for each server, and any mounts (or scripts to mount/unmount) need to be configured for each server. Note there are security considerations in sharing a backup location between servers (ie. you probably want to ensure that the backups made by one server are not readable by other servers).
     
  12. Stelios

    Stelios Active Member HowtoForge Supporter

    so it's not possible to get all backups into one single mount on the main controlpanel server?
     
  13. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    According to what @Jesse Norell and @till wrote above, exactly that is possible.
     
  14. Stelios

    Stelios Active Member HowtoForge Supporter

    @Taleman I'm missing something.
    I've enabled the backups and nothing is saved in controlpanel server. All the backups are saved on each server individually under their /var/backup and not on the controlpanel server.
     
  15. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    I didn't recall exactly host multi-server backups would be restored so took a few minutes to test. The backups are of course performed by the server where the data actually lives, so eg. I had a domain with mail_domain.domain_id = 5, and a mailbox with mail_user.mailuser_id = 10 in that domain set to backup. I ran my "mount" script to access my remote storage, and I have a backup file of /var/my_backup_dir/mail5/mail10_2020-09-21_00-04.zip which contains the user's "homedir" on the mail server (all files in /var/vmail/domain.com/username/ .. you will have username/ as the top level of the backup zip file).

    I'm about 98% sure (but you might confirm): backups are placed in folders with non-conflicting names, eg. "mail5" for mail_domain id 5, web20 for web_domain id 20, so you could have them all in on the same shared storage.

    Note that pertains to 3.1, I did not test 3.2beta in this regard.
     

Share This Page