Machine Backup

Discussion in 'Tips/Tricks/Mods' started by Marcio Urakawa, May 3, 2022.

  1. I need to migrate the Isp service to another machine because of storage.

    Does anyone have experiences with this?
     
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Marcio Urakawa and ahrasis like this.
  3. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    Yes, what do you mean with "Isp service"? Do you need to migrate the full server or just a website?
     
    Marcio Urakawa likes this.
  4. Sorry, I think about migrating the entire ispconfig server
     
  5. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

  6. Last edited: May 5, 2022
  7. If it were to transfer all sites ?
     
  8. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    Use the migration toolkit.
     
    Marcio Urakawa likes this.
  9. Using the toolkit, can I create a backup of the all Ispconfig?
    If the current machine for example now stops, a way to recover the backup of IspConfig.
    The sites and database I already do for the storage separately.
     
  10. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    The migration toolkit is probably not the best tool for your regular backups, but I suppose it could work too make a copy of the data. Someone else can confirm, but I don't think it will cleanup the "new" server, eg. if you are running out daily to keep a backup, it will copy your current data to the new server, but not delete old data there (say you delete a customer or something). I would use other tools, myself.
     
    Marcio Urakawa likes this.
  11. Yes, I need to set up a form for when some catastrophe occurs.
     
  12. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    whole server backups (vps snapshots or other) are likely the easiest to restore for total system failure. Other backup types are generally easier for restoring partial data (eg. customer deletes their email or website and needs them back). I have no idea what your server setup is, but we're running proxmox vm's and I really like the proxmox backup server for doing vm backups.
     
  13. We use Proxmox too, but we will switch to another infrastructure and we wanted to simulate restoring the service, other than by VM backup
     
    Last edited: May 6, 2022
  14. Ironically, after a week of this posting. There was a problem and the server was lost.
    I installed Ispconfig and restored the database I had backup.
    The system is currently experiencing an error:

    [Warning] Access denied for user 'ispconfig'@'localhost' (using password: YES)

    I changed the file: /usr/local/ispconfig/interface/lib/config.inc.php
    And I was able to access Ispconfig.
    But the system does not change the files when syncing.

    Need to edit another file?
     
  15. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    Yes, /usr/local/ispconfig/server/lib/config.inc.php
     
    Marcio Urakawa likes this.
  16. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    Also use the installer to reconfigure all services, as those read the password from the config.inc.php file.
     
    Marcio Urakawa and Th0m like this.
  17. Thanks for the help folks. Another question, so on the slave I should edit the same files?
     
  18. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    The slaves need to connect with the master, so the username/password they have configured (for 'dbmaster' settings in config.inc.php) need to be configured in your master's mysql users; if you reinstalled the master's database but didn't have a backup of your old user passwords then you might need to update it (change the master or the slave end so they match, it doesn't matter which you change).
     
    Marcio Urakawa likes this.
  19. Thanks immensely for the help.
    Well, I installed Ispconfig on the new server, and it's working to create sites, db, ftp.
    But the sites I restored from the old server, for some reason I can't edit the settings.
    I don't know why it creates the site for http only. Even with the "ssl" marked by the ispconfig interface, when I see in the vhost the file is only configured for port 80

    htf_report.txt
    Code:
    ##### SERVER #####
    IP-address (as per hostname): ***.***.***.***
    [WARN] could not determine server's ip address by ifconfig
    [INFO] OS version is Debian GNU/Linux 11 (bullseye)
     
    [INFO] uptime:  08:39:56 up 22:40,  1 user,  load average: 0,00, 0,00, 0,00
     
    [INFO] memory:
                   total        used        free      shared  buff/cache   available
    Mem.:           15Gi       4,1Gi       1,1Gi        51Mi        10Gi        11Gi
    Swap:          951Mi       4,0Mi       947Mi
     
    [INFO] systemd failed services status:
      UNIT LOAD ACTIVE SUB DESCRIPTION
    0 loaded units listed.
    
    [INFO] ISPConfig is installed.
    
    ##### ISPCONFIG #####
    ISPConfig version is 3.2.8p1
    
    
    ##### VERSION CHECK #####
    
    [INFO] php (cli) version is 7.4.29
    [INFO] php-cgi (used for cgi php in default vhost!) is version 7.4.29
    
    ##### PORT CHECK #####
    
    [WARN] Port 8080 (ISPConfig) seems NOT to be listening
    [WARN] Port 25 (SMTP server) seems NOT to be listening
    [WARN] Port 465 (SMTP server SSL) seems NOT to be listening
    [WARN] Port 25 (SMTP server) seems NOT to be listening
    
    ##### MAIL SERVER CHECK #####
    
    
    ##### RUNNING SERVER PROCESSES #####
    
    [INFO] I found the following web server(s):
            Apache 2 (PID 1069684)
    [WARN] I could not determine which mail server is running.
    [INFO] I found the following pop3 server(s):
            Dovecot (PID 775)
    [INFO] I found the following imap server(s):
            Dovecot (PID 775)
    [INFO] I found the following ftp server(s):
            PureFTP (PID 561596)
    ##### LISTENING PORTS #####
    (sem            ()
    Endereço                (Remoto)
    [localhost]:10023               (1041/postgrey)
    [localhost]:6379                (808/redis-server)
    [localhost]:11211               (782/memcached)
    [anywhere]:110          (775/dovecot)
    [anywhere]:9102         (789/bareos-fd)
    [anywhere]:143          (775/dovecot)
    [localhost]:9137                (31985/php-fpm:)
    [anywhere]:21           (561596/pure-ftpd)
    ***.***.***.***:53              (31721/named)
    ***.***.***.***:53              (31721/named)
    ***.***.***.***:53              (31721/named)
    ***.***.***.***:53              (31721/named)
    ***.***.***.***:53              (31721/named)
    ***.***.***.***:53              (31721/named)
    ***.***.***.***:53              (31721/named)
    ***.***.***.***:53              (31721/named)
    [localhost]:53          (31721/named)
    [localhost]:53          (31721/named)
    [localhost]:53          (31721/named)
    [localhost]:53          (31721/named)
    [localhost]:53          (31721/named)
    [localhost]:53          (31721/named)
    [localhost]:53          (31721/named)
    [localhost]:53          (31721/named)
    [anywhere]:22           (872/sshd:)
    [localhost]:9079                (32086/php-fpm:)
    [localhost]:9080                (32086/php-fpm:)
    [localhost]:953         (31721/named)
    [localhost]:9115                (31985/php-fpm:)
    [localhost]:9085                (32086/php-fpm:)
    [anywhere]:4190         (775/dovecot)
    [anywhere]:993          (775/dovecot)
    [localhost]:9091                (32086/php-fpm:)
    [localhost]:9059                (32086/php-fpm:)
    [anywhere]:995          (775/dovecot)
    [localhost]:9092                (31985/php-fpm:)
    *:*:*:*::*:10023                (1041/postgrey)
    *:*:*:*::*:3306         (561469/mariadbd)
    *:*:*:*::*:6379         (808/redis-server)
    [localhost]10           (775/dovecot)
    *:*:*:*::*:9102         (789/bareos-fd)
    [localhost]43           (775/dovecot)
    *:*:*:*::*:80           (1069684/apache2)
    *:*:*:*::*:8081         (1069684/apache2)
    *:*:*:*::*:21           (561596/pure-ftpd)
    *:*:*:*::*:53           (31721/named)
    *:*:*:*::*:53           (31721/named)
    *:*:*:*::*:53           (31721/named)
    *:*:*:*::*:53           (31721/named)
    *:*:*:*::*:53           (31721/named)
    *:*:*:*::*:53           (31721/named)
    *:*:*:*::*:53           (31721/named)
    *:*:*:*::*:53           (31721/named)
    *:*:*:*::*ccaa:baff:fecb:53             (31721/named)
    *:*:*:*::*ccaa:baff:fecb:53             (31721/named)
    *:*:*:*::*ccaa:baff:fecb:53             (31721/named)
    *:*:*:*::*ccaa:baff:fecb:53             (31721/named)
    *:*:*:*::*ccaa:baff:fecb:53             (31721/named)
    *:*:*:*::*ccaa:baff:fecb:53             (31721/named)
    *:*:*:*::*ccaa:baff:fecb:53             (31721/named)
    *:*:*:*::*ccaa:baff:fecb:53             (31721/named)
    *:*:*:*::*:22           (872/sshd:)
    *:*:*:*::*:953          (31721/named)
    *:*:*:*::*:443          (1069684/apache2)
    *:*:*:*::*:4190         (775/dovecot)
    *:*:*:*::*:993          (775/dovecot)
    *:*:*:*::*:995          (775/dovecot)
    
    
    
    
    ##### IPTABLES #####
    Chain INPUT (policy ACCEPT)
    target     prot opt source               destination        
    f2b-sshd   tcp  --  [anywhere]/0            [anywhere]/0            multiport dports 22
    
    Chain FORWARD (policy ACCEPT)
    target     prot opt source               destination        
    
    Chain OUTPUT (policy ACCEPT)
    target     prot opt source               destination        
    
    Chain f2b-sshd (1 references)
    target     prot opt source               destination        
    RETURN     all  --  [anywhere]/0            [anywhere]/0          
    
    
    
    
    ##### LET'S ENCRYPT #####
    acme.sh is installed in /root/.acme.sh/acme.sh
    

    When i run : /usr/local/ispconfig/server/server.sh
    Code:
    19.05.2022-10:10 - DEBUG [plugins.inc:155] - Calling function 'check_phpini_changes' from plugin 'webserver_plugin' raise
    d by action 'server_plugins_loaded'. 
    19.05.2022-10:10 - DEBUG [server:217] - Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
    
    
    
     
    Last edited: May 19, 2022
  20. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    Are you editing as a client or as admin?
    Was this run from the correct server (the webserver, not master)? Were there pending changes to be made at the time you ran it?
     
    Marcio Urakawa likes this.

Share This Page