kamosika@kamosika-ThinkPad-E460:~$ sudo fdisk -l
Disk /dev/sda: 111.8 GiB, 120040980480 bytes, 234455040 sectors
Disk model: SanDisk SSD PLUS
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: toriaezuokikaeteokuwakrankara
Device Start End Sectors Size Type
/dev/sda1 2048 1050623 1048576 512M EFI System
/dev/sda2 1050624 234452991 233402368 111.3G Linux filesystem
Disk /dev/mmcblk0: 7.42 GiB, 7963934720 bytes, 15554560 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: toriaezuokikaeteokuwakrankara
Device Boot Start End Sectors Size Id Type
/dev/mmcblk0p1 8192 532479 524288 256M c W95 FAT32 (LBA)
/dev/mmcblk0p2 532480 15554559 15022080 7.2G 83 Linux
SDカードが接続されているのがわかるっぽいです。
text
1
2
3
Device Boot Start End Sectors Size Id Type
/dev/mmcblk0p1 8192 532479 524288 256M c W95 FAT32 (LBA)
/dev/mmcblk0p2 532480 15554559 15022080 7.2G 83 Linux
kamosika@kamosika-ThinkPad-E460:~$ mount
省略
/dev/mmcblk0p1 on /media/kamosika/bootfs type vfat (rw,nosuid,nodev,relatime,uid=1000,gid=1000,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,showexec,utf8,flush,errors=remount-ro,uhelper=udisks2)
以下のコマンドを実行するとunmountができるっぽい??ので実行します
text
1
2
3
kamosika@kamosika-ThinkPad-E460:~$ umount /dev/mmcblk0*
umount: /dev/mmcblk0: not mounted.
umount: /dev/mmcblk0p2: not mounted.
この状態でfsckコマンドを実行していくみたいなので実行していきます
1つ目
text
1
2
3
4
5
6
7
8
9
10
amosika@kamosika-ThinkPad-E460:~$ sudo fsck -V /dev/mmcblk0p1
fsck from util-linux 2.37.2
[/usr/sbin/fsck.vfat (1) -- /dev/mmcblk0p1] fsck.vfat /dev/mmcblk0p1
fsck.fat 4.2 (2021-01-31)
There are differences between boot sector and its backup.
This is mostly harmless. Differences: (offset:original/backup)
65:01/00
1) Copy original to backup
2) Copy backup to original
3) No action
何も問題がないっぽい・・・?ので3番を選択して言ってそのまま何もしないままにしました
2つ目
text
1
2
3
4
5
6
7
8
9
kamosika@kamosika-ThinkPad-E460:~$ sudo fsck -V /dev/mmcblk0p2
fsck from util-linux 2.37.2
[/usr/sbin/fsck.ext4 (1) -- /dev/mmcblk0p2] fsck.ext4 /dev/mmcblk0p2
e2fsck 1.46.5 (30-Dec-2021)
rootfs: recovering journal
Journal transaction 354711 was corrupt, replay was aborted.
rootfs contains a file system with errors, check forced.
Pass 1: Checking inodes, blocks, and sizes
Inodes that were part of a corrupted orphan linked list found. Fix<y>?
sudo -Hu postgres pg_dump -d pleroma --format=custom -f /home/kamosika/pleroma_backup/pleroma.pgdump
kamosika@komaniya:/opt/pleroma $ ls -l ~/pleroma_backup/
total 332
-rw-r--r-- 1 postgres postgres 339395 Nov 9 23:51 pleroma.pgdump
ちゃんとバックアップ?が作成されているっぽかったので良かったです。
次に進みます。
次の手順が・・・
Copy pleroma.pgdump, config/prod.secret.exs, config/setup_db.psql (if still available) and the uploads folder to your backup destination. If you have other modifications, copy those changes too.
Restore the database schema and pleroma postgres role the with the original setup_db.psql if you have it: sudo -Hu postgres psql -f config/setup_db.psql.
amosika@pleniya:/opt/pleroma$ sudo MIX_ENV=prod mix ecto.migrate
fatal: detected dubious ownership in repository at '/opt/pleroma'
To add an exception for this directory, call:
git config --global --add safe.directory /opt/pleroma
fatal: detected dubious ownership in repository at '/opt/pleroma'
To add an exception for this directory, call:
git config --global --add safe.directory /opt/pleroma
fatal: detected dubious ownership in repository at '/opt/pleroma'
To add an exception for this directory, call:
git config --global --add safe.directory /opt/pleroma
Could not find Hex, which is needed to build dependency :phoenix
Shall I install Hex? (if running non-interactively, use "mix local.hex --force") [Yn]
kamosika@pleniya:/opt/pleroma$sudo-HupleromaMIX_ENV=prodmixecto.migrateCompiling599files(.ex)18:30:23.462[debug]Elixir.Pleroma.Web.ActivityPub.MRF.MediaProxyWarmingPolicyisexcludedfromconfigdescriptions,becausedoesnotimplement`config_description/0`method.18:30:23.521[debug]Elixir.Pleroma.Web.ActivityPub.MRF.QuoteToLinkTagPolicyisexcludedfromconfigdescriptions,becausedoesnotimplement`config_description/0`method.18:30:23.521[debug]Elixir.Pleroma.Web.ActivityPub.MRF.ForceBotUnlistedPolicyisexcludedfromconfigdescriptions,becausedoesnotimplement`config_description/0`method.18:30:23.521[debug]Elixir.Pleroma.Web.ActivityPub.MRF.NoEmptyPolicyisexcludedfromconfigdescriptions,becausedoesnotimplement`config_description/0`method.18:30:23.521[debug]Elixir.Pleroma.Web.ActivityPub.MRF.EnsureRePrependedisexcludedfromconfigdescriptions,becausedoesnotimplement`config_description/0`method.18:30:23.521[debug]Elixir.Pleroma.Web.ActivityPub.MRF.ForceMentionsInContentisexcludedfromconfigdescriptions,becausedoesnotimplement`config_description/0`method.18:30:23.521[debug]Elixir.Pleroma.Web.ActivityPub.MRF.UserAllowListPolicyisexcludedfromconfigdescriptions,becausedoesnotimplement`config_description/0`method.18:30:23.521[debug]Elixir.Pleroma.Web.ActivityPub.MRF.AntiLinkSpamPolicyisexcludedfromconfigdescriptions,becausedoesnotimplement`config_description/0`method.18:30:23.521[debug]Elixir.Pleroma.Web.ActivityPub.MRF.AntiFollowbotPolicyisexcludedfromconfigdescriptions,becausedoesnotimplement`config_description/0`method.18:30:23.521[debug]Elixir.Pleroma.Web.ActivityPub.MRF.FollowBotPolicyisexcludedfromconfigdescriptions,becausedoesnotimplement`config_description/0`method.18:30:23.521[debug]Elixir.Pleroma.Web.ActivityPub.MRF.DropPolicyisexcludedfromconfigdescriptions,becausedoesnotimplement`config_description/0`method.18:30:23.521[debug]Elixir.Pleroma.Web.ActivityPub.MRF.TagPolicyisexcludedfromconfigdescriptions,becausedoesnotimplement`config_description/0`method.18:30:23.521[debug]Elixir.Pleroma.Web.ActivityPub.MRF.NoPlaceholderTextPolicyisexcludedfromconfigdescriptions,becausedoesnotimplement`config_description/0`method.18:30:23.522[debug]Elixir.Pleroma.Web.ActivityPub.MRF.NoOpPolicyisexcludedfromconfigdescriptions,becausedoesnotimplement`config_description/0`method.Compilinglib/pleroma/web/router.ex(it's taking more than 10s)Generatedpleromaapp18:32:02.049[error]Postgrex.Protocol(#PID<0.4662.0>) failed to connect: ** (Postgrex.Error) FATAL 28P01 (invalid_password) password authentication failed for user "pleroma"18:32:02.050[error]Postgrex.Protocol(#PID<0.4661.0>) failed to connect: ** (Postgrex.Error) FATAL 28P01 (invalid_password) password authentication failed for user "pleroma"18:32:03.299[error]Postgrex.Protocol(#PID<0.4661.0>) failed to connect: ** (Postgrex.Error) FATAL 28P01 (invalid_password) password authentication failed for user "pleroma"18:32:04.548[error]Couldnotcreateschemamigrationstable.Thiserrorusuallyhappensduetothefollowing:*Thedatabasedoesnotexist*The"schema_migrations"table,whichEctousesformanagingmigrations,wasdefinedbyanotherlibrary*Thereisadeadlockwhilemigrating(suchasusingconcurrentindexeswithamigration_lock)Tofixthefirstissue,run"mix ecto.create"forthedesiredMIX_ENV.Toaddressthesecond,youcanrun"mix ecto.drop"followedby"mix ecto.create",bothforthedesiredMIX_ENV.AlternativelyyoumayconfigureEctotouseanothertableand/orrepositoryformanagingmigrations:config:pleroma,Pleroma.Repo,migration_source:"some_other_table_for_schema_migrations",migration_repo:AnotherRepoForSchemaMigrationsThefullerrorreportisshownbelow.**(DBConnection.ConnectionError)connectionnotavailableandrequestwasdroppedfromqueueafter2978ms.Thismeansrequestsarecominginandyourconnectionpoolcannotservethemfastenough.Youcanaddressthisby:1.Ensuringyourdatabaseisavailableandthatyoucanconnecttoit2.Trackingdownslowqueriesandmakingsuretheyarerunningfastenough3.Increasingthepool_size(althoughthisincreasesresourceconsumption)4.Allowingrequeststowaitlongerbyincreasing:queue_targetand:queue_intervalSeeDBConnection.start_link/2formoreinformation(ecto_sql3.10.1)lib/ecto/adapters/sql.ex:913:Ecto.Adapters.SQL.raise_sql_call_error/1(elixir1.14.0)lib/enum.ex:1658:Enum."-map/2-lists^map/1-0-"/2(ecto_sql3.10.1)lib/ecto/adapters/sql.ex:1005:Ecto.Adapters.SQL.execute_ddl/4(ecto_sql3.10.1)lib/ecto/migrator.ex:738:Ecto.Migrator.verbose_schema_migration/3(ecto_sql3.10.1)lib/ecto/migrator.ex:552:Ecto.Migrator.lock_for_migrations/4(ecto_sql3.10.1)lib/ecto/migrator.ex:428:Ecto.Migrator.run/4(ecto_sql3.10.1)lib/ecto/migrator.ex:170:Ecto.Migrator.with_repo/3(pleroma2.6.0)lib/mix/tasks/pleroma/ecto/migrate.ex:63:Mix.Tasks.Pleroma.Ecto.Migrate.run/1
kamosika@pleniya:/opt/pleroma$ sudo -Hu pleroma vim config/prod.secret.exs
kamosika@pleniya:/opt/pleroma$ sudo -Hu pleroma MIX_ENV=prod mix ecto.migrate
==> restarter
Generated restarter app
==> pleroma
Compiling 599 files (.ex)
18:38:51.880 [debug] Elixir.Pleroma.Web.ActivityPub.MRF.MediaProxyWarmingPolicy is excluded from config descriptions, because does not implement `config_description/0` method.
18:38:51.915 [debug] Elixir.Pleroma.Web.ActivityPub.MRF.QuoteToLinkTagPolicy is excluded from config descriptions, because does not implement `config_description/0` method.
18:38:51.915 [debug] Elixir.Pleroma.Web.ActivityPub.MRF.ForceBotUnlistedPolicy is excluded from config descriptions, because does not implement `config_description/0` method.
18:38:51.915 [debug] Elixir.Pleroma.Web.ActivityPub.MRF.NoEmptyPolicy is excluded from config descriptions, because does not implement `config_description/0` method.
18:38:51.915 [debug] Elixir.Pleroma.Web.ActivityPub.MRF.EnsureRePrepended is excluded from config descriptions, because does not implement `config_description/0` method.
18:38:51.915 [debug] Elixir.Pleroma.Web.ActivityPub.MRF.ForceMentionsInContent is excluded from config descriptions, because does not implement `config_description/0` method.
18:38:51.915 [debug] Elixir.Pleroma.Web.ActivityPub.MRF.UserAllowListPolicy is excluded from config descriptions, because does not implement `config_description/0` method.
18:38:51.915 [debug] Elixir.Pleroma.Web.ActivityPub.MRF.AntiLinkSpamPolicy is excluded from config descriptions, because does not implement `config_description/0` method.
18:38:51.915 [debug] Elixir.Pleroma.Web.ActivityPub.MRF.AntiFollowbotPolicy is excluded from config descriptions, because does not implement `config_description/0` method.
18:38:51.915 [debug] Elixir.Pleroma.Web.ActivityPub.MRF.FollowBotPolicy is excluded from config descriptions, because does not implement `config_description/0` method.
18:38:51.915 [debug] Elixir.Pleroma.Web.ActivityPub.MRF.DropPolicy is excluded from config descriptions, because does not implement `config_description/0` method.
18:38:51.915 [debug] Elixir.Pleroma.Web.ActivityPub.MRF.TagPolicy is excluded from config descriptions, because does not implement `config_description/0` method.
18:38:51.915 [debug] Elixir.Pleroma.Web.ActivityPub.MRF.NoPlaceholderTextPolicy is excluded from config descriptions, because does not implement `config_description/0` method.
18:38:51.915 [debug] Elixir.Pleroma.Web.ActivityPub.MRF.NoOpPolicy is excluded from config descriptions, because does not implement `config_description/0` method.
Compiling lib/pleroma/web/router.ex (it's taking more than 10s)
Generated pleroma app
18:40:31.351 [info] == Running 20221216052127 Pleroma.Repo.Migrations.AddStateToBackups.up/0 forward
18:40:31.351 [info] alter table backups
18:40:31.359 [info] == Migrated 20221216052127 in 0.0s
18:40:31.601 [info] == Running 20230306112859 Pleroma.Repo.Migrations.InstancesAddMetadata.change/0 forward
18:40:31.602 [info] alter table instances
18:40:31.605 [info] == Migrated 20230306112859 in 0.0s
18:40:31.608 [info] == Running 20230422154018 Pleroma.Repo.Migrations.DropUnusedIndexes.up/0 forward
18:40:31.608 [info] drop index if exists activities_actor_index
18:40:31.621 [info] drop index if exists activities_to_index
18:40:31.624 [info] drop index if exists activities_cc_index
18:40:31.626 [info] drop index if exists activities_hosts
18:40:31.844 [info] drop index if exists activities_in_reply_to
18:40:31.846 [info] drop index if exists activities_likes
18:40:31.848 [info] == Migrated 20230422154018 in 0.2s
18:40:31.850 [info] == Running 20230504173400 Pleroma.Repo.Migrations.RemoveUserApEnabled.change/0 forward
18:40:31.850 [info] alter table users
18:40:31.853 [info] == Migrated 20230504173400 in 0.0s