0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Macからmini PCにwikijs移植してみた

0
Posted at

Macで作ったwikijsをmini PCに移植してみました。

Ubuntu

Dockerインストール後、

mkdir wikijs

Ubuntuのip確認
ip addr

Mac

docker ps

docker psでコンテナ名
yamlでDBユーザ名とDB名を確認しsqlのバックアップを取る
docker exec -t <postgresコンテナ名> pg_dump -U <DBユーザー名> <DB名> > wikijs_backup.sql

scpでデータをMacからUbuntuに転送
scp wikijs_backup.sql ユーザー名@UbuntuのIP:/home/ユーザー名/wikijs/
scp compose.yml ユーザー名@UbuntuのIP:/home/ユーザー名/wikijs/

Ubuntu

docker compose up -d
cat ~/wikijs_backup.sql | docker exec -i <postgresコンテナ名> psql -U  <DBユーザー名> <DB名>
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?