Hi guys, Messed up this morning. tried to upgrade from centos 7 to centos8 and broke everything. In the end i want to set everything up again but i need to recover the email forwarding list from the broken ispconfig3.1 server first so i can then format and reinstall debian and ispconfig3.2
i have direct physical access to the server and it runs and i can log into the console. i just need some assistance to get to the data and save it to a USB in a way that i can do the full setup with Debian and ispc3.2 and reimport the file or copy its contents back to the new server. single client single domain single dns zone single email address this server is only for forwarding incoming emails to predetermined external email addresses. This user has 1500 email forwarders for his domain. but i don't want to have to manually retype all of those individual forwarded email addresses.
Make a backup of the dbispconfig database, you can do that with the mysqldump command. Example: mysqldump -u root -p dbispconfig > dbispconfig.sql The command will then ask for mysql root password. Then you should make a backup of the folder /etc, /var/vmail, /usr/local/ispconfig and /var/www. Take care to preserve permissions e.g. by using commands like "tar pcfz vmail.tar.gz /var/vmail" to back up the folders. Just to be sure, but the most important part in your case is the dbispconfig database as you seem to use mail and DNS only. We will then have to see how the reimport can be done as you switch to another OS, so we can't import the full dbispconfig database without damaging the new system configuration. Most likely, you have to import the database dump into a temporary database, then export separately only the mail_*, spamfilter_* and dns_* tables using phpmyadmin and then import these into the new ISPConfig datababase and then use Tools > resync in ISPConfig to write the config to disk.
OK... so is there a command i can do (yes even if just line by line) or file i can edit and add in these forwards? as in bulk ether copy paste or script
The procedure is this: We will then have to see how the reimport can be done as you switch to another OS, so we can't import the full dbispconfig database without damaging the new system configuration. Most likely, you have to import the database dump into a temporary database, then export separately only the mail_*, spamfilter_* and dns_* tables using phpmyadmin and then import these into the new ISPConfig datababase and then use Tools > resync in ISPConfig to write the config to disk.
OK so everything went wrong and i figured i have all the data needed so i have just rebuilt the server. question... is there a command line way of add an email forward? bascily im hoping i can make a script
You can re-add the data using phpmyadmin, this is the easiest way and works well. Of course you may add data manually using the API, but this is way more complicated and requires you to write a program for the SOAP or REST API. Maybe you should contact business support and ask for a quote that Thom imports the data for you: https://www.ispconfig.org/get-support/?type=ispconfig