Is it possible to backup my ubuntu postgresql database by copying the /var/lib/postgresql/9.1/main file and pasting it back in?
Yes, as long as you install version 9.1 (minor version doesn't matter). And normally you don't need to copy/move them anywhere, the installation will notice there is already a database system set up and will use it. Of course taking a backup is never a bad idea.

Then again, the reason for it being offline should be clear from PostgreSQL logs. Memory allocations can be too high, or some other thing, and this is reported in the log.