❓ Help Any Docker Experts? I need help

Status
Not open for further replies.
Sino po expert dito sa docker?

May WordPress site kasi ako na naka-deploy sa docker.

Ang tanong ko po, paano ang correct way para fully ma-back-up yung lahat ng contents pati DB (mysql na kasama sa docker-compose.yaml) na walang error?
Mag-a-upgrade kasi ako ng SSD so malamang sa malamang, reinstall ang Ubuntu server OS ko.

The last na ginawa ko kasi eh kinopya ko lang lahat ng directories niya then nilipat ko sa ibang system. Tapos same docker-compose.yaml ang config. Kaso lang, ang nangyari, nabubuksan ko ung site, visible pa naman yung contents pero di ko na ma-access yung wp-admin dashboard niya dahil ang laging error eh "DB credentials wrong" kahit tama naman ung credentials ng DB na nilalagay ko (na kasama sa docker-compose.yaml file). So ang result, siyempre, dahil di ko mabuksan ung wp-admin dashboard, di ako makapag-edit at makapag-add ng posts or any admin stuffs.

Ang ending tuloy, nagback to scratch ako. Re-make lahat ng mga posts.
Ngayon sana, ayoko na mangyari ang ganon since ung medyo madami na posts na nadon (since April pa). Masasayang na naman oras at effort ko kung magba-back to scratch ulit ako.
 
Hello! I can help you with your Docker-related issue in backing up your WordPress site and database properly to avoid errors when restoring them after reinstalling your Ubuntu server OS.

To fully back up your WordPress site and MySQL database within Docker, you can follow these steps:

1. Backup WordPress Site Files:
- Copy all the WordPress site files from the container to your host machine. You can use the docker cp command to copy files from a Docker container to your host machine. For example:
Code:
     docker cp <container_name>:/var/www/html /path/on/host
- Ensure you copy all necessary files including the WordPress core files, themes, plugins, uploads, and any other custom files you may have.

2. Backup MySQL Database:
- Dump the MySQL database within the Docker container to a SQL file. You can use the docker exec command to run mysqldump within the MySQL container. For example:
Code:
     docker exec <mysql_container_name> mysqldump -u root -p<password> <database_name> > /path/on/host/db_backup.sql
- This command will dump the database to a SQL file on your host machine.

3. Backup Docker Compose Configuration:
- Make sure to save your docker-compose.yaml file which contains the configurations for your WordPress and MySQL containers.

4. Backup WordPress Configuration:
- Ensure you have a backup of your wp-config.php file which contains the database credentials for WordPress.

5. Reinstall Ubuntu and Docker:
- After reinstalling your OS, install Docker and Docker Compose following the official documentation.

6. Restore WordPress Site and Database:
- Copy back the WordPress site files to the appropriate directory within the new container.
- Restore the MySQL database backup using the mysql command within the MySQL container.
- Update the wp-config.php file with the correct database credentials.

By following these steps, you should be able to fully back up and restore your WordPress site and MySQL database without encountering "DB credentials wrong" errors. Make sure to double-check the paths and configurations to ensure a successful restoration.

If you encounter any issues during this process, feel free to ask for further assistance!
 
Gamit ka po 'duplicati'. Watch mo nalang sa youtube kung pano setup. Yan po gamit ko backup n restore.

Other solution is gamit ka nalang ng WP plugin 'UpdraftPlus' backup and restore. Then save mo nalang yung docker-compose.yml mo then fresh install Wordpress, then restore mo nalang using Updraft.

Make sure lang po ng pag nag restore ka ng WP parehas yung version.
 
Status
Not open for further replies.

Similar threads

About this Thread

  • 6
    Replies
  • 509
    Views
  • 3
    Participants
Last reply from:
Araragi

Trending Topics

Online now

Members online
1,190
Guests online
1,274
Total visitors
2,464

Forum statistics

Threads
2,273,505
Posts
28,950,009
Members
1,235,784
Latest member
heroshiru
Back
Top