Merge pull request #150 from Truemmerer/main

Backup and migrate webhostings
This commit is contained in:
Christoph 2024-01-31 15:13:08 +01:00 committed by GitHub
commit aa263b4c0b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 657 additions and 0 deletions

View file

@ -0,0 +1,327 @@
---
title:
description: Guide to creating backups and migrating to new hosting.
level: [beginner]
updated_at: 2023-10-24
slug: backup-and-migrate-webhostings
author_name: Truemmerer
author_url: https://github.com/Truemmerer
author_image: https://avatars.githubusercontent.com/u/14333843?v=4
author_bio:
tags: [webhosting, ftp, backup]
netcup_product_url: https://www.netcup.de/hosting/
language: en
available_languages: [de, en]
---
# Introduction
This tutorial explains how to back up and move applications that are operated in Plesk (WebhostingControlPanel(WCP)). These instructions can be used for the following netcup products:
- Webhosting
- Reseller Webhosting
- managed private server
WordPress is used as a reference in this guide, as this application is very popular and widespread.
Please note that this tutorial is not necessarily completely applicable to your own application and that the documentation of the corresponding application should also be taken into account if possible. If you use your own plugins or themes, further steps may be necessary.
> **Warning**
>
> You are always responsible for your own content and therefore also for the backup of this content.
If you need help, you are welcome to contact the netcup forum, where customers are happy to help each other and exchange Notermation:
[https://forum.netcup.de](https://forum.netcup.de/?l=2)
# Step 1 - Order a new hosting
- [Webhosting](https://www.netcup.eu/hosting/)
- [Reseller Webhosting](https://www.netcup.eu/hosting/reseller-webhosting.php)
- [managed private Server](https://www.netcup.eu/professional/managed-server/managed-privateserver.php)
> **Note**
>
> This step is only necessary if you want to migrate to a hosting that does not yet exist. This step can also be skipped if only a backup of the application/website is to be created.
>
> When moving to a reseller web hosting or a managed private server, corresponding subscriptions and service packages must be created, which cannot be transferred from the previous hosting! This is not necessary if the corresponding products are operated as power users.
# Step 2 - Switch application/website to maintenance mode
> **Note**
>
> This step is not absolutely necessary. However, it is recommended for applications that support this to prevent subsequent errors.
>
> When installing WordPress via the WordPress Toolkit, the toolkit itself can be used for this >purpose.
> To do this, click in Plesk (WebhostingControlPanel(WCP)) on `WordPress -> Maintenance mode` (for the corresponding website)
> **Hint**
>
> This can be individualized using the symbol on the far right next to Maintenance mode.
![Click on WordPress in Plesk](/community-tutorials/backup-and-migrate-webhostings/images/step2-image01.png)
![Activate Maintaince mode](/community-tutorials/backup-and-migrate-webhostings/images/step2-image02.png)
![View of the standard maintenance mode after activation](/community-tutorials/backup-and-migrate-webhostings/images/step2-image03.png)
# Step 3 - Backup of files
## Find out the document root of the domain
> **Note:**
> The document root is the directory in which the files of your application/website are located.
Unter *Websites & Domains* -> bei der Domain wird diese am unteren Rand angezeigt:
![Document-root](/community-tutorials/backup-and-migrate-webhostings/images/step3-image02.png)
## Plesk Filemanager
Call up the document root of your domain. Then tick all files in the directory. Now you can create a `.zip` via `Archive -> Add to Archive`.
![Create archive](/community-tutorials/backup-and-migrate-webhostings/images/step3-image05.png)
Now you can click on the menu next to the created .zip file and click on `download`.
![Download archive](/community-tutorials/backup-and-migrate-webhostings/images/step3-image06.png)
## FTP-Access
If you do not have your access data, you can specify access in Plesk under "Websites & Domains" using one of the following symbols:
![Auf eines dieser Icons klicken](/community-tutorials/backup-and-migrate-webhostings/images/step3-image01.png)
Only the main user can be edited under *Connection info* or under *Web Hosting Access*.
Make a note of the following data in this step:
- IPv4 or IPv6 Adresse (IPv4 is recommend)
- Username (Example: hosting12496)
- Password
> **Tip:**
>
> [You can find more information in the HelpCenter of netucp](https://helpcenter.netcup.com/en/wiki/web-hosting/ftp-access)
### Establish FTP connection
> **Note:**
> There are special clients for FTP access. In most operating systems, however, the file manager can be used for this purpose.
To do this, open the file manager of your operating system and then the address bar.
To edit the address bar in Windows, you can click on the following key combination: **CTRL + L**
Then enter one of the following points in the address line:
- `ftp://IP-ADRESSE`
- `sftp://IP-ADRESSE`
- `ftp://BENUTERNAME@IP-ADRESSE`
- `sftp://BENUTZERNAME@IP-ADRESSE`
> **Note:**
> sftp only possible for the standard FTP user!
![Enter FTP address](/community-tutorials/backup-and-migrate-webhostings/images/step3-image03.png)
The password and user name should then be requested:
![FTP-Acccess](/community-tutorials/backup-and-migrate-webhostings/images/step3-image04.png)
### Download files
If the login was successful, the base directory of the hosting should now be displayed. Then navigate to the document root and copy all files and folders locally to your computer.
> **Note:**
> This may take some time!
# Step 4 - Database backup
> **Note:**
> Not every application has a database. If you are not sure about this, check the documentation for the application you are using.
## Determine correct database
Only your application itself can tell you which database belongs to your application/website. You can usually find this information in the configuration file of the corresponding application. For WordPress, this would be the file `wp-config.php` in the document root of the domain. The database name can then be read from the following line:
`define( 'DB_NAME', 'k123456_wp_kefj2' )`
k123456_wp_kefj2 is the name of the database in this example.
## Create and export an Dump of the database
Now click on 'Databases' in the left sidebar in Plesk (WebhostingControlPanel(WCP)).
The database with the name determined in the last step should be available there.
![Click on databases](/community-tutorials/backup-and-migrate-webhostings/images/step4-image01.png)
Then click on 'Export Dump'.
![Click on Export Dump](/community-tutorials/backup-and-migrate-webhostings/images/step4-image02.png)
A pop-up should now appear in which you can select the directory in which the image can be saved. You can also check the box to automatically download the image afterwards.
![Click on Export Dump](/community-tutorials/backup-and-migrate-webhostings/images/step4-image03.png)
> **Note:**
> If the download fails, the image can be downloaded via FTP. See step 3.
# Step 5 - Backup of e-mails
> **Note:**
> This step is only necessary if e-mails are available.
netcup itself does not offer a tool to create backups of emails. However, you can use a mail client such as Outlook or Thunderbird for this purpose. As this differs from client to client, this tutorial does not go into this point in detail. We recommend that you check the documentation of the mail client provider. Alternatively, the forum will be happy to help you:
[https://forum.netcup.de](https://forum.netcup.de/?l=2)
However, if you are migrating to a reseller web hosting or a managed private server, you can use [https://mailsync.netcup.net/](https://mailsync.netcup.net/).
To do this, the mailbox for the email address must be created on the new hosting.You can find instructions in the [HelpCenter](https://helpcenter.netcup.com/en/wiki/web-hosting/creating-mail-server)
> **Note:**
> This does not create a backup!
> **Note:**
> The tool cannot be used to move from web hosting to web hosting! A backup must be created via the client.
# First conclusion
You have now successfully created a manual backup of your application/website.
The following steps explain how to migrate the domain, files and database to the new hosting.
# Step 6 - Assign domain to the new hosting
## Migration to a new web hosting (own account)
In order to be able to use the domain in the new hosting, the domain must be assigned to it.
This can be done via the `CustomerControlPanel(CCP) -> Domains -> Magnifying glass in front of Domain -> Administration`.
You can find instructions in the [HelpCenter](https://helpcenter.netcup.com/en/wiki/domain/connecting-domain-webhosting)
> **Important:**
>
> If the domain is currently assigned to a hosting, the assignment will be canceled. This will delete all files, databases and email addresses assigned to the domain. Please back up all data beforehand!
> The deletion does not affect any other domains (if these are cleanly separated)
## Migration to a new web hosting (different account)
In this case, the domain must be transferred to the new account via AuthCode. You can obtain the AuthCode via `CustomerControlPanel(CCP) -> Domains -> Magnifying glass in front of Domain -> Cancellation`.
[Instruction in the HelpCenter](https://helpcenter.netcup.com/en/wiki/domain/domain-cancellation)
The domain must then be ordered in the new account via `CustomerControlPanel(CCP) -> Domains -> green order button` with the AuthCode.
[Instructions in the HelpCenter](https://helpcenter.netcup.com/en/wiki/domain/ordering-domain)
> **Note:**
> If the domain can be managed as an inclusive domain, you can check the Inclusive domain option when ordering.
> **Important:**
>
> If the domain is currently assigned to a hosting, the assignment will be removed. This will delete all files, databases and email addresses assigned to the domain. Please back up all data beforehand!
> The deletion does not affect any other domains (if these are cleanly separated)
## Migration to a reseller web hosting or to a managed private server
With reseller web hosting or a managed private server, the domain can be created directly in Plesk and the move can be carried out more easily while the site is still accessible on the old hosting.
The domain can be created directly in Plesk for this purpose.
An assignment via the CustomerControlPanel(CCP) is not necessary.
# Step 7 - Create database in new hosting
## Create database
A new and empty database must be created so that the database previously backed up in step 4 can be imported into the new hosting. To do this, the administration must first be called up in the same way as when backing up the database in the old hosting:
![Click on Databases](/community-tutorials/backup-and-migrate-webhostings/images/step4-image01.png)
The following button should then be displayed:
![Click on Add database](/community-tutorials/backup-and-migrate-webhostings/images/step7-image01.png)
Now the red fields must be filled in.
1. in the first field, a name for the database is selected. This can be freely chosen.
2. in the lower field, a database user is created who is to access the database. The name and password can be freely selected here.
> **Important:**
>
> Make a note of the database name, the name of the database user and their password, as this will be required later for the application.
![Create database and database user](/community-tutorials/backup-and-migrate-webhostings/images/step7-image02.png)
## Find out the IP of the database
Also make a note of the IP of the database server. This is displayed directly under the name of the database created.
![Find out the IP of the database](/community-tutorials/backup-and-migrate-webhostings/images/step7-image03.png)
# Step 8 - Import database
Now that a database is available, the saved database can be imported.To do this, click on "Import Dump".
In the following popup, select the file with the extension `.sql.zip`.
> **Note:**
>
> The import may now take some time.
![Import database](/community-tutorials/backup-and-migrate-webhostings/images/step8-image01.png)
# Step 9 - Upload files
> **Important**
>
> Make sure that there are no files in the directory. If there are any, delete them first.
## Plesk file manager
Open the document root of your domain. Then click on the `blue symbol with the plus` and then on `Upload files`
If you have uploaded the website as `.zip`, then unzip the files by clicking on the zip and then on `Archive -> Extract files`.
## FTP
Proceed as described in step 3 for the new hosting. Except that you do not download any files, but upload the files previously saved in step 3.
# Step 10 - Tell the application the correct database
Now you have to change your application to the correct database. If this is not done, it will continue to try to access the database of the old hosting. This is usually done directly in a file called config. For WordPress, this is `wp-config.php`.
Search for the following lines in this file and adjust them accordingly:
**Database name:**
define( 'DB_NAME', 'DATENBANK_NAME' );
**Database user**
define( 'DB_USER', 'DATENBANK_BENUTZER' );
**Password of the database user**
define( 'DB_PASSWORD', 'PASSWORT_DES_DATENBANK_BENUTZERS' );
**IP of the database server**
define( 'DB_HOST', 'IP_DES_DATENBANKSERVERS:3306' );
# Step 11 - Deactivate maintenance mode
Finally, you should deactivate maintenance mode. For WordPress, remove the file `.maintenance` in the document root of the domain
# Conclusion
You have now successfully backed up your website and moved it to a new hosting.
> **Note:**
>
> If you are using a new managed private server or reseller web hosting, don't forget to adjust your DNS settings for the domain accordingly.
# Licence
[MIT](https://github.com/netcup-community/community-tutorials/blob/main/LICENSE)
Copyright (c) 2021 netcup
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicence, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# Contributor's Certificate of Origin
By making a contribution to this project, I certify that:
1) The contribution was created in whole or in part by me and I have the right to submit it under the licence indicated in the file; or
2) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate licence and I have the right under that licence to submit that work with modifications, whether created in whole or in part by me, under the same licence (unless I am permitted to submit under a different licence), as indicated in the file; or
3) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it.
4) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the licence(s) involved.

View file

@ -0,0 +1,330 @@
---
title:
description: Leitfaden zum Erstellen von Backups und zur Migration auf ein neues Hosting.
level: [beginner]
updated_at: 2023-10-24
slug: backup-and-migrate-webhostings
author_name: Truemmerer
author_url: https://github.com/Truemmerer
author_image: https://avatars.githubusercontent.com/u/14333843?v=4
author_bio:
tags: [webhosting, ftp, backup]
netcup_product_url: https://www.netcup.de/hosting/
language: de
available_languages: [de, en]
---
# Einführung
Dieses Tutorial erläutert die Sicherung sowie den Umzug von Anwendungen, welche in Plesk (WebhostingControlPanel(WCP)) betrieben werden. Diese Anleitung kann bei netcup für folgende Produkte verwendet werden:
- Webhosting
- Reseller Webhosting
- managed private Server
Als Referenz wird in dieser Anleitung WordPress verwendet, da diese Anwendung sehr beliebt und verbreitet ist.
Bitte beachte, dass dieses Tutorial nicht unbedingt für die eigene Anwendung komplett anzuwenden ist und möglichst auch die Dokumentation der entsprechenden Anwendung berücksichtigt werden sollte. Bei der Nutzung eigener Plugins oder Themes sind gegebenenfalls weitere Schritte notwendig.
> **Achtung**
>
> Du bist für deine eigenen Inhalte stets selbst verantwortlich und somit auch für die Sicherung dieser.
Solltest du Hilfe benötigen, dann kannst du dich gerne an das Forum von netcup wenden, in welchem sich die Kunden gerne untereinander helfen und austauschen:
[https://forum.netcup.de](https://forum.netcup.de/)
# Schritt 1 - Bestellung eines neuen Hostings
- [Webhosting](https://www.netcup.de/hosting/)
- [Reseller Webhosting](https://www.netcup.de/hosting/reseller-webhosting.php)
- [managed private Server](https://www.netcup.de/professional/managed-server/managed-privateserver.php)
> **Info**
>
> Dieser Schritt ist nur notwendig, wenn auf ein noch nicht existierenden Hosting migriert werden soll. Zudem kann dieser Schritt übersprungen werden, wenn nur ein Backup der Anwendung/Webseite erstellt werden soll.
>
> Bei einem Umzug auf ein Reseller Webhosting sowie auf ein managed private Server müssen entsprechende Abonements und Service-Pakete angelegt werden, welche nicht vom bisherigen Hosting übertragen werden können! Dies ist nicht notwendig, wenn die entsprechenden Produkte als Power User betrieben werden.
# Schritt 2 - Anwendung/Webseite in den Wartungsmodus schalten
> **Info**
>
> Dieser Schritt ist nicht zwingend notwendig. Es ist jedoch bei Anwendungen zu empfehlen, welche dies unterstützen um anschließende Fehler vorzubeugen.
Bei der Installation von WordPress über das WordPress Toolkit kann hierzu das Toolkit selbst verwendet werden.
Klicke dazu in Plesk (WebhostingControlPanel(WCP)) auf `WordPress -> Wartungsmodus` (bei der entsprechenden Webseite)
> **Tipp**
>
> Über das Symbol ganz rechts neben Wartungsmodus kann dieser individuallisiert werden.
![Auf WordPress in Plesk klicken](/community-tutorials/backup-and-migrate-webhostings/images/step2-image01.png)
![Aktiviere den Wartungsmodus](/community-tutorials/backup-and-migrate-webhostings/images/step2-image02.png)
![Ansicht des Standard-Wartungsmodus nach Aktivierung](/community-tutorials/backup-and-migrate-webhostings/images/step2-image03.png)
# Schritt 3 - Sicherung der Dateien
## Den Dokumentenstamm der Domain herausfinden
> **Info:**
> Der Dokumentenstamm ist das Verzeichnis, in welchem die Dateien deiner Anwendung/Webseite liegen.
Unter *Websites & Domains* -> bei der Domain wird diese am unteren Rand angezeigt:
![Dokumentenstamm](/community-tutorials/backup-and-migrate-webhostings/images/step3-image02.png)
## Plesk Dateimanager
Rufe den Dokumentenstamm deiner Domain auf. Anschließend hake alle Dateien im Verzeichnis an. Nun kannst du ein `.zip` erstellen über `Archivieren -> In Archiv packen`
![Archiv erstellen](/community-tutorials/backup-and-migrate-webhostings/images/step3-image05.png)
Nun kannst du neben der erstellten .zip Datei auf das Menü klicken und auf `herunterladen`.
![Archiv herunterladen](/community-tutorials/backup-and-migrate-webhostings/images/step3-image06.png)
## FTP
### FTP-Zugang
Solltest du deine Zugangsdaten nicht vorliegen haben, kannst du in Plesk unter "Websites & Domains" über eines der folgenden Symbole den Zugang festlegen:
![Auf eines dieser Icons klicken](/community-tutorials/backup-and-migrate-webhostings/images/step3-image01.png)
Unter *Verbindungsdaten* oder unter *Webhosting-Zugang* kann nur der Hauptbenutzer bearbeitet werden.
Notiere dir in diesem Schritt folgende Daten:
- IPv4 oder IPv6 Adresse (IPv4 wird empfohlen)
- Benutzername (Beispiel für ein Webhosting: hosting12496)
- Passwort
> **Tipp:**
> [Weitere Informationen findest du im HelpCenter von netucp](https://helpcenter.netcup.com/de/wiki/webhosting/ftp-zugang/)
### Per FTP Verbinden
> **Info:**
> Es gibt spezielle Clients für den FTP-Zugriff. In den meisten Betriebssytemen kann hierzu jedoch der Dateimanager verwendet werden.
Rufe hierzu den Dateimanager deines Betriebssystemes und anschließend die Adresszeile auf.
Um die Adresszeile in Windows bearbeiten zu können, kann folgende Tastenkombination geklickt werden: **STRG + L**
In die Adresszeile kommt anschließend einer der Folgenden Punkte rein:
- `ftp://IP-ADRESSE`
- `sftp://IP-ADRESSE`
- `ftp://BENUTERNAME@IP-ADRESSE`
- `sftp://BENUTZERNAME@IP-ADRESSE`
> **Info:**
> sftp ist nur beim Standard-FTP-Benutzer möglich!
![FTP-Adresse eintragen](/community-tutorials/backup-and-migrate-webhostings/images/step3-image03.png)
Anschließend sollte das Passwort und der Benutzername abgefragt werden:
![FTP-Zugangsdaten](/community-tutorials/backup-and-migrate-webhostings/images/step3-image04.png)
### Daten herunterladen
Wenn der Login erfolgreich war, sollte nun das Basisverzeichnis des Hostings angezeigt werden. Navigiere dich anschließend zum Dokumentenstamm und kopiere dir alle Dateien und Ordner lokal auf den Rechner.
> **Info:**
> Dies kann einige Zeit in Anspruch nehmen!
# Schritt 4 - Sicherung der Datenbank
> **Info:**
> Nicht jede Anwendung hat eine Datenbank. Solltest du dir hier nicht sicher sein, dann prüfe die Dokumentation deiner genutzten Anwendung.
## Korrekte Datenbank feststellen
Eine Auskunft, welche Datenbank zu deiner Anwendung/Webseite gehört kann dir nur deine Anwendung selbst geben. In der Regel findest du diese Information in der Konfigurationsdatei der entsprechenden Anwendung. Bei WordPress wäre dies die Datei `wp-config.php` im Dokumentenstamm der Domain. Der Datenbankname kann anschließend aus folgender Zeile herausgelesen werden:
`define( 'DB_NAME', 'k123456_wp_kefj2' )`
k123456_wp_kefj2 ist in diesem Beispiel der Name der Datenbank.
## Ein Abbild der Datenbank erstellen und exportieren
Klicke nun in Plesk (WebhostingControlPanel(WCP)) in der linken Seitenleiste auf `Datenbanken`.
Dort sollte die Datenbank mit dem im letzten Schritt ermittelten Namen vorhanden sein.
![Auf Datenbanken klicken](/community-tutorials/backup-and-migrate-webhostings/images/step4-image01.png)
Daraufhin klicke auf `Abbild exportieren`
![Auf Abbild exportieren klicken](/community-tutorials/backup-and-migrate-webhostings/images/step4-image02.png)
Nun sollte ein PopUp erscheinen in dem das Verzeichnis ausgewählt werden kann, in welchem das Abbild gespeichert werden kann. Zudem kann ein Haken gesetzt werden, dass das Abbild im Anschluss automatisch heruntergeladen wird.
![Auf Abbild exportieren klicken](/community-tutorials/backup-and-migrate-webhostings/images/step4-image03.png)
> **Info:**
> Sollte der Download fehlschlagen, kann das Abbild per FTP heruntergeladen werden. Siehe Schritt 3.
# Schritt 5 - Sicherung der E-Mails
> **Info:**
> Dieser Schritt ist nur notwendig, wenn E-Mails vorhanden sind.
netcup selbst bietet kein Tool an, um Backups von E-Mails zu erstellen. Hierzu kannst du jedoch einen Mailclienten wie Outlook oder Thunderbird nutzen. Da dies von Client zu Client unterschiedlich ist, geht dieses Tutorial nicht genauer auf den Punkt ein. Hier empfiehlt sich die Dokumentation des Anbieters des Mail-Clienten zu prüfen. Alternativ unterstützt dich auch gerne das Forum:
[https://forum.netcup.de](https://forum.netcup.de/)
Solltest du jedoch auf ein Reseller Webhosting oder auf einen managed private Server migrieren, kannst du [https://mailsync.netcup.net/](https://mailsync.netcup.net/) verwenden.
Dazu muss das Postfach der E-Mail-Adresse auf dem neuen Hosting erstellt werden. Eine Anleitung findest du im [HelpCenter](https://helpcenter.netcup.com/de/wiki/webhosting/webhosting-email-einrichten/)
> **Wichtig:**
> Dies erstellt kein Backup
> **Info:**
> Das Tool kann nicht zum Umzug von Webhosting zu Webhosting verwendet werden! Hier muss ein Backup über den Clienten erstellt werden.
# Erstes Fazit
Du hast nun erfolgreich ein Backup deiner Anwendung/Webseite manuell erstellt.
In den folgenden Schritten wird die Migration der Domain, den Dateien und der Datenbank auf das neue Hosting erläutert.
# Schritt 6 - Domain dem neuen Hosting zuweisen
## Migration zu einem neuen Webhosting (selber Account)
Um die Domain im neuen Hosting nutzen zu können, muss die Domain diesem zugewiesen werden.
Dies kann über das `CustomerControlPanel(CCP) -> Domains -> Lupe vor Domain -> Verwaltung` durchgeführt werden.
Eine Anleitung findest du im [HelpCenter](https://helpcenter.netcup.com/de/wiki/domain/domain-webhosting-verbinden/)
> **Wichtig:**
>
> Wenn die Domain derzeit einem Hosting zugewiesen ist, wird die Zuweisung aufgehoben. Hierbei werden alle Dateien, Datenbanken und E-Mail-Adressen, die der Domain zugewiesen sind gelöscht. Sichere dir daher zuvor alle Daten!
> Die Löschung betrifft keine anderen Domains (wenn diese sauber getrennt sind)
## Migration zu einem neuen Webhosting (anderer Account)
In diesem Fall muss die Domain per AuthCode in den neuen Account transferiert werden. Den AuthCode erhälst du über `CustomerControlPanel(CCP) -> Domains -> Lupe vor Domain -> Kündigung`
[Anleitung im HelpCenter](https://helpcenter.netcup.com/de/wiki/domain/domain-kuendigung/)
Anschließend muss im neuen Account die Domain über `CustomerControlPanel(CCP) -> Domains -> grüner Bestellbutton` mit dem AuthCode bestellt werden.
[Anleitung im HelpCenter](https://helpcenter.netcup.com/de/wiki/domain/domain-bestellen/)
> **Hinweis:**
> Sollte die Domain als Inklusivdomain geführt werden können, kannst du bei der Bestellung Inklusivdomain als Option anhaken.
> **Wichtig:**
>
> Wenn die Domain derzeit einem Hosting zugewiesen ist, wird die Zuweisung aufgehoben. Hierbei werden alle Dateien, Datenbanken und E-Mail-Adressen, die der Domain zugewiesen sind gelöscht. Sichere dir daher zuvor alle Daten!
> Die Löschung betrifft keine anderen Domains (wenn diese sauber getrennt sind)
## Migration zu einem Reseller Webhosting oder zu einem managed private Server
Bei einem Reseller Webhosting oder einem managed private Server kann die Domain direkt in Plesk angelegt werden und der Umzug einfacher ablaufen, wärend die Seite noch auf dem alten Hosting erreichbar ist.
Dazu kann die Domain in Plesk direkt angelegt werden.
Eine Zuweisung ist über das CustomerControlPanel(CCP) nicht notwendig.
# Schritt 7 - Datenbank im neuen Hosting anlegen
## Datenbank erstellen
Damit die zuvor in Schritt 4 gesicherte Datenbank im neuen Hosting eingespielt werden kann, muss eine neue und leere Datenbank erstellt werden. Dazu muss zuerst die Verwaltung wie auch beim Sichern der Datenbank im alten Hosting aufgerufen werden:
![Auf Datenbanken klicken](/community-tutorials/backup-and-migrate-webhostings/images/step4-image01.png)
Anschließend sollte folgeder Button angezeigt werden:
![Auf Datenbank hinzufügen klicken](/community-tutorials/backup-and-migrate-webhostings/images/step7-image01.png)
Nun müssen die roten Felter ausgefüllt werden.
1. Im ersten Feld, wird ein Name für die Datenbank herausgesucht. Dieser kann frei gewählt werden.
2. Im unteren Feld, wird ein Datenbankbenutzer erstellt, welcher auf die Datenbank zugreifen soll. Hier kann der Name und das Passwort frei gewählt werden.
> **Wichtig:**
>
> Notiere dir den Datenbanknamen, den Namen des Datenbankbenutzers und dessen Passwort, da dies später für die Anwendung benötigt wird.
![Datenbank und Datenbankbenutzer erstellen](/community-tutorials/backup-and-migrate-webhostings/images/step7-image02.png)
## IP der Datenbank herausfinden
Notiere dir zudem die IP des Datenbankservers. Diese wird bei der angelegten Datenbank direkt unter deren Namen angezeigt.
![Datenbank-IP feststellen](/community-tutorials/backup-and-migrate-webhostings/images/step7-image03.png)
# Schritt 8 - Datenbank einspielen
Nun da eine Datenbank vorhanden ist, kann die gesicherte Datenbank importiert werden. Klicke dazu auf `Abbild importieren`
Im darauffolgenden PopUp wähle die Datei mit der Endung `.sql.zip` aus.
> **Hinweis:**
>
> Der Import kann nun einige Zeit in Anspruch nehmen.
![Datenbank importieren](/community-tutorials/backup-and-migrate-webhostings/images/step8-image01.png)
# Schritt 9 - Dateien hochladen
> **Wichtig**
>
> Achte darauf, dass im Verzeichnis keine Dateien vorhanden sind. Sollten welche vorhanden sein, dann lösche diese zuvor heraus.
## Plesk Dateimanager
Rufe den Dokumentenstamm deiner Domain auf. Anschließend klicke auf das `blaue Symbol mit dem Plus` und anschließend auf `Dateien hochladen`
Solltest du die Webseite als `.zip` hochgeladen haben, so entpacke anschließend die Dateien, in dem du das Zip anhakst und dann auf `Archivieren -> Dateien extrahieren` klickst.
## FTP
Gehe wie in Schritt 3 beschrieben für das neue Hosting vor. Nur das du keine Dateien herunterlädst, sondern die zuvor in Schritt 3 gesicherten Dateien hochlädst.
# Schritt 10 - Anwendung die korrekte Datenbank mitteilen.
Nun musst du deine Anwendung auf die korrekte Datenbank umstellen. Wird dies nicht gemacht, wird diese weiterhin versuchen auf die Datenbank des alten Hostings zuzugreifen. In der Regel wird dies direkt in einer Datei mit dem Namen config vorgenommen. Bei WordPress lautet diese `wp-config.php`.
Suche in dieser folgende Zeilen und passe diese entsprechend an:
**Datenbankname:**
define( 'DB_NAME', 'DATENBANK_NAME' );
**Datenbankbenutzer**
define( 'DB_USER', 'DATENBANK_BENUTZER' );
**Passwort des Datenbankbenutzers**
define( 'DB_PASSWORD', 'PASSWORT_DES_DATENBANK_BENUTZERS' );
**IP des Datenbankservers**
define( 'DB_HOST', 'IP_DES_DATENBANKSERVERS:3306' );
# Schritt 11 - Wartungsmodus deaktivieren
Nun solltest du abschließend noch den Wartungsmodus deaktiviere. Für WordPress entferne im Dokumentenstamm der Domain die Datei `.maintenance`
# Fazit
Du hast nun erfolgreich deine Webseite gesichert und auf ein neues Hosting umgezogen.
> **Hinweis:**
>
> Solltest du einen neuen managed private Server oder ein Reseller Webhosting nutzen, so vergesse nicht, deine DNS-Einstellungen bei der Domain entsprechend anzupassen.
# Licence
[MIT](https://github.com/netcup-community/community-tutorials/blob/main/LICENSE)
Copyright (c) 2021 netcup
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicence, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# Contributor's Certificate of Origin
By making a contribution to this project, I certify that:
1) The contribution was created in whole or in part by me and I have the right to submit it under the licence indicated in the file; or
2) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate licence and I have the right under that licence to submit that work with modifications, whether created in whole or in part by me, under the same licence (unless I am permitted to submit under a different licence), as indicated in the file; or
3) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it.
4) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the licence(s) involved.

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1,022 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB