Guest User

Untitled

a guest
Feb 18th, 2019
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. # Migrating the Mastodon database
  2.  
  3. ## On the old server
  4.  
  5. ```sh
  6. postgres@postgresql:~$ pg_dump -Fc mastodon -f mastodon.dump
  7. ```
  8.  
  9. OR
  10.  
  11. ```sh
  12. postgres@postgresql:~$ pg_dump -Fc mastodon > mastodon.dump
  13. ```
  14.  
  15. ## On the new server
  16.  
  17. ```sh
  18. postgres=# CREATE USER mastodon;
  19. postgres@postgresql:~$ createdb -T template0 mastodon
  20. postgres@postgresql:~$ pg_restore -n public --no-owner --role=mastodon -d mastodon mastodon.dump
  21. ```
Add Comment
Please, Sign In to add comment