Restore a nuBuilder Backup: Difference between revisions

From nuBuilderForte
Jump to navigation Jump to search
[Added] Restore a nuBuilder Backup
 
Line 49: Line 49:
This method bypasses phpMyAdmin and is suitable for large files.
This method bypasses phpMyAdmin and is suitable for large files.


== Option 4: Utilize BigDump ==
== Option 4: Utilise BigDump ==
BigDump is a staggered MySQL dump importer script that allows you to import large SQL files without timeout issues.
BigDump is a staggered MySQL dump importer script that allows you to import large SQL files without timeout issues.



Revision as of 15:11, 28 May 2025

Importing a Backup in nuBuilder

1. Rename the Backup File

Before proceeding, rename your backup file to nubuilder4.sql.

2. Place the File in the Root Directory

Copy the renamed nubuilder4.sql file into the root directory of your nuBuilder installation. If a file named nubuilder4.sql already exists there, overwrite it.

3. Create the Target Database

If the target database does not exist, create it using your preferred database management tool (e.g., phpMyAdmin or MySQL CLI).

4. Edit the Configuration File

Open the nuconfig.php file and update the database configuration settings:

  • Database name
  • Username
  • Password

5. Automatic Import on First Login

When you log in to nuBuilder for the first time and the specified database is empty, nuBuilder will automatically import the contents of nubuilder4.sql into the database.

Other Options

Option 1: Compress the SQL File

Compress your `.sql` file using `gzip` to create a `.sql.gz` file. phpMyAdmin supports importing compressed files, which can help bypass upload size limitations.

Option 2: Increase PHP Configuration Limits

Edit your `php.ini` file to increase the following parameters:

upload_max_filesize = 2048M
post_max_size = 2048M
memory_limit = 2048M
max_execution_time = 1800
max_input_time = 1800

After making these changes, restart your web server to apply the new settings.

Option 3: Use the MySQL Command Line

Import the database directly using the command line:

mysql -u your_username -p your_database < /path/to/yourfile.sql

Replace `your_username`, `your_database`, and `/path/to/yourfile.sql` with your actual MySQL username, database name, and the path to your SQL file. This method bypasses phpMyAdmin and is suitable for large files.

Option 4: Utilise BigDump

BigDump is a staggered MySQL dump importer script that allows you to import large SQL files without timeout issues.

  1. Download BigDump from its official website.
  2. Configure the script with your database credentials.
  3. Upload both the BigDump script and your SQL file to your server.
  4. Run the script via your web browser to import the database in segments.

Importing in Linux

To import the backup using a Linux terminal, follow these steps:

  1. Open a terminal.
  2. Navigate to the directory containing your `.sql` file:
cd /path/to/yourfile/
  1. Run the MySQL import command:
mysql -u your_username -p your_database < nubuilder4.sql

You will be prompted for your MySQL password. Once entered, the SQL file will be imported into the specified database.