crazycooky77 / ci_project5

0 stars 1 forks source link

[ENH] Transfer Database from ElephantSQL #11

Open crazycooky77 opened 5 months ago

crazycooky77 commented 5 months ago

Is your feature request related to a problem? Please describe. ElephantSQL is being discontinued in January 2025. The database will need to be moved to another platform for official go-live after project grading.

Describe the solution you'd like Local Droplet database creation in DigitalOcean.

Describe alternatives you've considered https://neon.tech/

Additional context These steps will be followed for official go-live:

  1. In the ElephantSQL admin console, under Backup, select "Backup now"
  2. Once complete, click "Download"
  3. Upload the file to the Droplet in Terminal
    1. Ensure to use the Droplet user for postgresql (typically "postgres")
    2. scp <LOCAL_FILE_LOCATION/NAME> <DROPLET_USER@DROPLET_IP>:~
  4. Connect to the Droplet using ssh <DROPLET_USER@DROPLET_IP>
    1. If necessary, switch to the postgresql user using sudo -u postgres -i
  5. lzop -cd <BACKUP_FILENAME> | psql "$DATABASE_NAME"