How to Manually Restore a RunCloud Backup, if the Application has been removed
If you’ve saved a backup on AWS and need to restore it manually, please note that the RunCloud dashboard does not support manual restoration of downloaded backups. In this scenario your app and backup profiles no longer exist.
Instead, you’ll need to use an SFTP client like FileZilla to upload files and follow specific steps to restore your website and database. Below is a detailed guide to help you through the process.
Step 1: Recreate the Web Application
Since the original application is no longer available, you’ll need to recreate the web application in RunCloud. Follow these steps:
- Log in to your RunCloud dashboard.
- Navigate to RunCloud → Server → Web Applications → Create Web App.
- Fill in the required details to set up the new web application.
Once the web application is created, proceed to the next step.
Step 2: Upload the Website Files
To restore your website files, you’ll need to upload them to the web app’s root location using an SFTP client like FileZilla. Here’s how:
- Open your SFTP client and connect to your server.
- Use the credentials provided by RunCloud for your server.
- Locate the backup file you downloaded from AWS.
- Extract the contents of the backup file on your local machine.
- Upload the extracted files to the web root directory of your newly created web application.
- The web root is typically located at
/home/newuser/webapps/<your-app-name>/.
- The web root is typically located at
- After uploading, run the fix ownership to correct file permissions. This is located under the Application → Tools → Fix Ownership.
This ensures that the web server has the necessary permissions to access the files.
Step 3: Restore the Database
The database restoration process involves creating a new database, uploading the backup files, and restoring the data using MyLoader. Follow these steps carefully:
Create a New Database
- In the RunCloud dashboard, go to RunCloud → Server → Databases → Add New Database.
- Enter a name for your new database (you can use any name you prefer).
- Note down the database name as you’ll need it later.
- Ensure you create a user at the same time and assign this to the database.
Download and Upload the Database Snapshot
- Locate your database backup file in the AWS backup.
- Download the snapshot to your local machine.
- Use your SFTP client to upload the database backup file to your server.
- Upload the file to a temporary directory, such as
/home/newuser/webapps/<your-app-name>/tmp.
- Upload the file to a temporary directory, such as
Extract the Database File
- Connect to your server via SSH.
- Move the uploaded snapshot file to
/home/newuser/webapps/<your-app-name>/tmpif it’s not already there:mv <snapshotname>.tar.gz /home/newuser/webapps/<your-app-name>/tmp - Navigate to the
/home/newuser/webapps/<your-app-name>/tmpdirectory:cd /home/newuser/webapps/<your-app-name>/tmp - Extract the snapshot file:
tar -xzf <snapshotname>.tar.gz
Run MyLoader to Restore the Database
Use the following command to restore the database using MyLoader:
/RunCloud/Packages/mydumper-rc/bin/myloader --user root --overwrite-tables --database 'databasename' --directory '/home/newuser/webapps/<your-app-name>/tmp/database/'- Replace
databasenamewith the name of the database you created earlier. - Ensure the
--directorypath matches the location of your extracted database files.
- Replace
Wait for the process to complete. Once done, your database will be restored.
Final Steps
After completing the above steps, verify that your website and database are functioning correctly. Test your site by visiting its URL and ensure all data is intact. If you encounter any issues, double-check the file paths, database names, and permissions.
