This file captures the issues and recovery steps documented during the lab workflow.
Check service status:
toor@ip-172-31-10-211:~/migration-lab$ sudo systemctl status postgresql● postgresql.service - PostgreSQL RDBMS
Loaded: loaded (/usr/lib/systemd/system/postgresql.service; enabled; preset: enabled)
Active: active (exited) since Sun 2026-04-12 17:59:34 UTC; 11min ago
Main PID: 3981 (code=exited, status=0/SUCCESS)
CPU: 2ms
Apr 12 17:59:34 ip-172-31-10-211 systemd[1]: Starting postgresql.service - PostgreSQL RDBMS...
Apr 12 17:59:34 ip-172-31-10-211 systemd[1]: Finished postgresql.service - PostgreSQL RDBMS.
Verify credentials in db_config.sh and check pg_hba.conf for authentication settings if needed.
Make scripts executable:
toor@ip-172-31-10-211:~/migration-lab$ chmod +x *.shCheck file ownership:
toor@ip-172-31-10-211:~/migration-lab$ ls -ltotal 36
-rw-rw-r-- 1 toor toor 2213 Apr 12 18:05 MIGRATION_RUNBOOK.md
-rw-rw-r-- 1 toor toor 2429 Apr 12 18:04 ROLLBACK_RUNBOOK.md
-rwxrwxr-x 1 toor toor 1167 Apr 12 18:04 backup_database.sh
drwxrwxr-x 2 toor toor 4096 Apr 12 18:07 backups
-rwxrwxr-x 1 toor toor 133 Apr 12 18:00 db_config.sh
drwxrwxr-x 2 toor toor 4096 Apr 12 18:09 logs
-rwxrwxr-x 1 toor toor 3021 Apr 12 18:01 migrate.sh
drwxrwxr-x 5 toor toor 4096 Apr 12 18:02 migrations
-rwxrwxr-x 1 toor toor 1852 Apr 12 18:03 pre_migration_check.sh
-rwxrwxr-x 1 toor toor 1564 Apr 12 18:05 restore_database.sh
-rwxrwxr-x 1 toor toor 2436 Apr 12 18:06 validate_migration.sh
Check disk space:
toor@ip-172-31-10-211:~/migration-lab$ df -hFilesystem Size Used Avail Use% Mounted on
/dev/root 30G 9.7G 21G 33% /
tmpfs 1.9G 0 1.9G 0% /dev/shm
tmpfs 768M 1.2M 767M 1% /run
tmpfs 5.0M 0 5.0M 0% /run/lock
efivarfs 128K 4.0K 120K 4% /sys/firmware/efi/efivars
/dev/nvme0n1p16 881M 135M 685M 17% /boot
/dev/nvme0n1p15 105M 6.1M 99M 6% /boot/efi
tmpfs 384M 104K 384M 1% /run/user/1001
Review pg_dump permissions if backup creation still fails.