Encountered an error while restoring from a backup

The best way to see if you need more RAM is to watch for paging activity.

I use

vmstat 5 5

because it leaves a record that I can cut and paste. Some will use top or htop.