OpenACS Articles‎ > ‎

Restoring from Backup

For Postgres, these are the steps to take to recover you database from backup.
  • Stop Aolserver (svc -d /service/service0 usually does it)
  • dropdb service0
  • createdb -E UNICODE service0
  • psql -f mydb.dmp service0
  • Bring Aolserver back up (svc -u /service/service0)
I think you might also need to copy the content-repository directory files. They might not be backed up with just the db backup. It depends on whether you have your content repository set to save to the filesystem or database.

If your service0 name is different than the dumped file, you can use Perl to update the service0 name

In crontab:

35 12 * * * tar -cf /web/safe4all/safe4all-cr-files.tar /web/safe4all/content-repository-content-files/ ; gzip /web/safe4all/safe4all-cr-files.tar
0 5 * * * /usr/bin/sftp -b /web/safe4all/database-backup/sftp-batchfile backupuser@ipaddress
See a page which describes setting up password-less ssh authentication


cd /home/backupuser
put /web/safe4all/database-backup/safe4all_*.dmp
put /web/safe4all/safe4all-cr-files.tar.gz


Getting weird invalid command \N errors when you try to restore?