How do I back up my site with LWS Drive?

Procédure

How do I back up my site with LWS Drive?

In order to back up your website online with LWS Drive, your web space must have SSH access. We recommend that you subscribe to a cPanel package with SSH access or a VPS server package.

Without SSH access, it will be impossible to connect your web space to your remote server. For this to work, you need to generate two RSA keys (one public and one private) so that the two spaces can communicate with each other.

1. Generate the keys (public and private) with the following command:

ssh-keygen -t rsa -b 2048

2. Transfer the public key to the remote server using the following command:

ssh-copy-id -i /folder/.ssh/id_rsa.pub user@remote_server
  • /folder/: is the location of your keys. The location will be indicated to you when the keys are generated.
  • user: corresponds to the identifier created on your online backup space
  • remote_server: corresponds to the IP address of your online backup space. You received the ip address by email when you subscribed to the service.

You will be asked for the password for your stick space so that you can move the public key to the LWS Drive online backup space.

3. The command used to make a backup of your site to your online backup space is:

rsync -rtlvz -e ssh --delete user@remote_server:/files/"/public_html/"
  • User: corresponds to the user name of your remote server
  • Remote_server: corresponds to the ip of your remote server
  • /files/: this is the directory in which you want to make the backup on the remote server.
  • /public_html/: This is the folder containing your website that you want to back up.

Conclusion

You can now back up your website with LWS Drive. It may be worth adding a cron job to automate the task and have regular backups of your website. You can create a backup script for this.

Don't hesitate to share your comments and questions!

help.lws.net/a/1230
Was this article helpful?

Yes

No

Read 12 457 times

Thank you! Feel free to ask questions about our documentation if you would like more information, and help us improve it.

Similar articles

Questions about the article 2

Ask a question
Michel
20 Sept 2022
Comment faire une sauvegarde du site web et bases mySQL sous LWS starter pour changer de nom de domaine (procédure "permutation un hébergement") ? Merci de vos suggestions si vous en avez ...
fabrice-LWS Official answer
23 Sept 2022
Bonjour, vous pouvez effectuer une sauvegarde de votre site en vous connectant à votre espace FTP pour ce qui concerne les fichiers. Pour cela, vous pouvez suivre la procédure suivante: https://aide.lws.fr/a/79 . Pour ce qui concerne l'exportation de la base de données, vous pouvez suivre la procédure suivante: https://aide.lws.fr/a/737
Was this answer helpful?
chris38
12 Jan 2023
Bonjour, Je souhaite dupliquer fichiers et base de données d'un nom de domaine à un autre, les deux étant chez LWS. Comment faire ?
Benjamin-LWS Official answer
13 Jan 2023

Bonjour, merci pour votre question.

Il n'y a pas de moyen automatique de faire cela sur votre Panel LWS.

Mais voici quelques pistes pour vous aider à migrer des données :

  1. Téléchargez les fichiers de votre site web en utilisant un client FTP tel que FileZilla ou un l'outil de sauvegarde de fichiers disponible sur votre espace client. (Documentation relative : https://aide.lws.fr/a/96)
  2. Exportez votre base de données en utilisant un outil tel que phpMyAdmin ou en utilisant la commande mysqldump.
  3. Créez une nouvelle base de données pour votre nouveau nom de domaine dans le panel.
  4. Importez les données de votre base de données exportée dans la nouvelle base de données.
  5. Téléchargez les fichiers téléchargés précédemment vers le serveur de votre nouveau nom de domaine.
  6. Modifiez les paramètres de connexion à la base de données dans vos fichiers de configuration pour correspondre à votre nouvelle base de données.
  7. Vérifiez que votre site web fonctionne correctement sur le nouveau nom de domaine.

Il est important de noter que ces étapes peuvent varier en fonction de la configuration spécifique de votre site web.

Nous vous invitons à contacter notre service support à travers votre espace client, afin de vous apporter une aide si vous rencontrez des difficultés sur cette manipulation. (https://aide.lws.fr/a/268)
 

Was this answer helpful?

A question about this article?

Ask the LWS team and the community. Answers are published after moderation.

Ask the LWS team and its community a question

GDPR: Controller: LWS-Ligne Web Services. Purpose: moderation and public publication of your question, possible notification of an answer. Legal basis: consent (Art. 6(1)(a) GDPR). Email retention: 90 days after notification, 12 months maximum without an answer. To exercise your rights, see the GDPR section of our Terms and Conditions.