Backup e ripristino sito joomla

  • Creare il Backup dei File
  • Creare il Backup del Database
  • Ripristinare il Backup dei File
  • Ripristinare il Backup del Database

Detta così è piuttosto semplice. Passiamo al singolo dettaglio dei vari passaggi.

  • Create file backup
  • Creare db backup
  • Restore file backup
  • Restore database backup

This is so pretty simple. Let the individual details of each step.

Creare il Backup dei File

Occorre un client ftp: FileZilla andrà benissimo. Scaricatevi una copia intera di tutti i file. In ogni modo, disponendo di accesso all’host, ssh suppongo, sarebbe meglio fare un tar compresso di tutta la cartella. Si farà prima a copiare il tutto.

#> tar cvfz sito.tgz /var/www/sitojoomla/

Trasferiamo una copia dei file sul nostro PC. Andiamo avanti.

Creare il Backup del Database

Ci sono almeno due soluzioni. La prima è questa. Agire direttamente nel terminale ed eseguire il comando mysqldump:

# mysqldump -u utenteDB -ppassword dbjoomla > dbjoomla.sql
# gzip dbjoomla.sql dbjoomla.sql.zip

In alternativa, si può usare un pannello phpmydmin. Devo dire che va sempre meno di moda, e quindi si trova meno frequentemente. In caso, normalmente è sufficiente collegarsi al pannello e poi selezionare il Database. Quindi si trova il comando Esporta e si seguono le istruzioni seguenti, stando attenti a esportare in formato compresso ‘gzip’. Ora sempre con il fileZilla, si potrà trasferire una copia del database sul proprio PC.

Andiamo avanti.

Ripristinare il Backup dei File

Se abbiamo fatto un tar compresso (tgz), trasferiamolo sul nuovo hosting, e poi entriamo in ssh. Si deve estrarre tutto nella directory che ospiterà il sito.

Se abbiamo fatto una copia dei singoli file, allora copiamo con fileZilla i singoli file nella directory che ospiterà il sito.

Andiamo avanti.

Ripristinare il Backup del Database

Nel nuovo hosting, dubito che avrete il phpMyAdmin.  In ogni modo, se così è, fate la stessa cosa del backup. Ovviamente si parte da ‘Importa’.

Nel caso, quindi, non sia presente altro che il nostro amato prompt … allora, trasferite la copia del db sul nuovo hosting e quindi scompattatela:

# gunzip dbjoomla.sql.zip

Poi per ripristinare il dump sul nuovo database, usando le nuove credenziali di database, impartite il seguente comando:

# mysql -u utenteDB -p[password] [database_name] < dbjoomla.sql

 Ci sono buone probabilità che abbiate fatto.

 

Create file backup

You need a client ftp:FileZilla will be fine. You nedd to obtain a full copy of all the files in your hosting. Anyway, having access to the host, ssh, would be better to make a compressed tar file of the entire folder. It will take less time to copy everything.

#> tar cvfz sito.tgz /var/www/joomla/

User filezilla to take a copy on yout PC.

Go ahead!

Create database Backup

There are at least two solutions. The first is this. Act directly in the terminal and run the mysqldump command:

# mysqldump -u utenteDB -ppassword dbjoomla > dbjoomla.sql
# gzip dbjoomla.sql dbjoomla.sql.zip

Alternatively, you can use a panel phpmydmin. I must say that this is going out of fashion, and therefore is less frequently in your disposition. In case, it is usually sufficient to connect to the panel and then select the Database. Sothere is the Export command and follow the instructions that phpmyadmin tell; being careful to export in compressed format ‘gzip’. Now more with FileZilla, you can transfer a copy of the database on your PC.

Go ahead!

Restore file backup

If we made a compressed tar (tgz), trasferiamolo on the new hosting, and then we go through ssh. You must extract all the directory that will host the site.

If we had a copy of individual files, then we copy with FileZilla individual files in the directory that will host the site.

Moving on.

Restore database form backup

In the new hosting, I doubt that you will have the phpMyAdmin. Anyway, if so, do the same thing back up. Obviously you start with ‘Import’.

In the case, therefore, there is no other that our beloved prompt … then transferred to the copy of the db on the new hosting and then uncompress:

# gunzip dbjoomla.sql.zip

Next, to restore the dump on the new db, using your new account, type the following command:

# mysql -u utenteDB -p[password] [database_name] < dbjoomla.sql

There will be good chances  that you have done.

backup, mysql, restore

Commenti (3)

    • Francesco Venturini

      Ciao Marco.
      Per le tabelle in formato myisam si può fare ‘abbastanza’ tranquillamente.
      Per quelle innodb la cosa è un pò più complessa.
      cmq
      se hai archivi da restorare non in linea pupoi eseguire il cold backup innodb.

      lo incollo qui ma è lo stesso del manuale (https://dev.mysql.com/doc/refman/5.6/en/innodb-backup.html)

      Cold Backups
      If you can shut down your MySQL server, you can make a binary backup that consists of all files used by InnoDB to manage its tables. Use the following procedure:

      Do a slow shutdown of the MySQL server and make sure that it stops without errors.

      Copy all InnoDB data files (ibdata files and .ibd files) into a safe place.

      Copy all the .frm files for InnoDB tables to a safe place.

      Copy all InnoDB log files (ib_logfile files) to a safe place.

      Copy your my.cnf configuration file or files to a safe place.

      Ciao. Spero di esserti stato di aiuto

    • Francesco Venturini

      Ciao Marco.
      Per le tabelle in formato myisam si può fare ‘abbastanza’ tranquillamente.
      Per quelle innodb la cosa è un pò più complessa.
      cmq
      se hai archivi da restorare non in linea pupoi eseguire il cold backup innodb.

      lo incollo qui ma è lo stesso del manuale (https://dev.mysql.com/doc/refman/5.6/en/innodb-backup.html)

      Cold Backups
      If you can shut down your MySQL server, you can make a binary backup that consists of all files used by InnoDB to manage its tables. Use the following procedure:

      Do a slow shutdown of the MySQL server and make sure that it stops without errors.

      Copy all InnoDB data files (ibdata files and .ibd files) into a safe place.

      Copy all the .frm files for InnoDB tables to a safe place.

      Copy all InnoDB log files (ib_logfile files) to a safe place.

      Copy your my.cnf configuration file or files to a safe place.

      Ciao. Spero di esserti stato di aiuto

Rispondi a Francesco Venturini Annulla risposta

Il tuo indirizzo email non sarà pubblicato. I campi obbligatori sono contrassegnati *

Un progetto da realizzare?

Start up, think tank, idee da sviluppare in sistemi e software ...
angular
Python

© ICT360. All rights reserved. Powered by ICT360.