I have a working forum and want to see some things that got messed up a few days ago. I’m on AWS, so I make an AMI of the working forum, launch a new instance, and try to restore a backup from a few days ago. It fails with the messages below.
It can’t be a version or schema mis-match because the server is built from a fresh image of the working forum.
I’ve tried rebuilding.
I’ve tried restoring from a different backup from just one day ago- same thing.
The only odd thing I’ve done is I deleted pdf files from the upload directory (…/uploads/original/1X/*.pdf) to free up some space. I’ll try again without that step but it seems unlikely to be the culprit.
> [2019-11-30 01:17:44] 'admin' has started the restore! > [2019-11-30 01:17:44] Marking restore as running... > [2019-11-30 01:17:44] Making sure /var/www/discourse/tmp/restores/default/2019-11-30-011744 exists... > [2019-11-30 01:17:44] Downloading archive to tmp directory... > [2019-11-30 01:23:24] Unzipping archive, this may take a while... > [2019-11-30 01:27:52] No metadata file to extract. > [2019-11-30 01:27:52] Validating metadata... > [2019-11-30 01:27:52] Current version: 20191129144706 > [2019-11-30 01:27:52] Restored version: 20191120015344 > [2019-11-30 01:27:52] Extracting dump file... > [2019-11-30 01:50:57] invalid command \N > [2019-11-30 01:50:57] invalid command \N > > < repeats about 100 times > > > [2019-11-30 01:51:07] invalid command \N > [2019-11-30 01:54:13] invalid command \N > [2019-11-30 01:54:13] EXCEPTION: psql failed > [2019-11-30 01:54:14] /var/www/discourse/lib/backup_restore/restorer.rb:331:in `restore_dump' > /var/www/discourse/lib/backup_restore/restorer.rb:75:in `run' > /var/www/discourse/lib/backup_restore.rb:166:in `block in start!' > /var/www/discourse/lib/backup_restore.rb:163:in `fork' > /var/www/discourse/lib/backup_restore.rb:163:in `start!' > /var/www/discourse/lib/backup_restore.rb:22:in `restore!' > /var/www/discourse/app/controllers/admin/backups_controller.rb:119:in `restore' > etc...