Top Menu

Jump to content
Home
    Modules
      • Projects
      • Activity
      • Work packages
      • Gantt charts
      • Calendars
      • Team planners
      • Boards
      • News
    • Getting started
    • Introduction video
      Welcome to OpenProject Community
      Get a quick overview of project management and team collaboration with OpenProject. You can restart this video from the help menu.

    • Help and support
    • Upgrade to Enterprise edition
    • User guides
    • Videos
    • Shortcuts
    • Community forum
    • Enterprise support

    • Additional resources
    • Data privacy and security policy
    • Digital accessibility (DE)
    • OpenProject website
    • Security alerts / Newsletter
    • OpenProject blog
    • Release notes
    • Report a bug
    • Development roadmap
    • Add and edit translations
    • API documentation
  • Sign in
      Forgot your password?

      or sign in with your existing account

      Google

Side Menu

  • Overview
  • Activity
    Activity
  • Roadmap
  • Work packages
    Work packages
  • Gantt charts
    Gantt charts
  • Calendars
    Calendars
  • Team planners
    Team planners
  • Boards
    Boards
  • News
  • Forums

Content

Support Installation & Updates
  1. OpenProject
  2. Forums
  3. Support Installation & Updates
  4. Solved: error in manual. Restoring backup: pg_restore: [archiver] could not open input file #but file exists

Solved: error in manual. Restoring backup: pg_restore: [archiver] could not open input file #but file exists

Added by Piotr F about 4 years ago

Hi,

Just following the manual on backup and restore (which I hope contains the changes after an error incidentally discovered by me a year ago or so).

So here it is what I get on pgdump restoring:

sudo pg_restore --clean --if-exists --dbname $(sudo openproject config:get DATABASE_URL) postgresql-dump-20210412200002.pgdump

pg_restore: [archiver] could not open input file "postgresql-dump-20210412200002.pgdump": No such file or directory

The point is, the file exists there, meaning in

/var/db/openproject/backup

where it should be according to the manual.

So either I am doing something wrong, or the manual is incorrect.

Could anybody help?

Cheers,

Piotr


Replies (1)

RE: Restoring backup: pg_restore: [archiver] could not open input file #but file exists - Added by Piotr F about 4 years ago

After reinstall postgresql and reconfigure OP, which works now, I still cannot get through this, having a simple output:

sudo openproject config:get DATABASE_URL
postgres://openproject:psswd@127.0.0.1:5432/openproject
user@servername:$ sudo pg_restore --clean --if-exists --dbname $(sudo openproject config:get DATABASE_URL) postgresql-dump-20210412200002.pgdump
pg_restore: [archiver] could not open input file "postgresql-dump-20210412200002.pgdump": No such file or directory

The point is, this file is there:

Hence, I did a test on the clean default OP db: created a "project 1", backed up (yes, backup files exist), removed "project 1", created "project 2", stopped OP from running, no www output,

and then I did

sudo pg_restore --clean --if-exists --dbname $(sudo openproject config:get DATABASE_URL) postgresql-dump-20210419151456.pgdump

which has been recently created.

And the output is the same:

pg_restore: [archiver] could not open input file "postgresql-dump-20210412200002.pgdump": No such file or directory

So, I am happy to tell you that there is a mistake in the manual, the final restore command should be WITH THE PATH, and look like

sudo pg_restore --clean --if-exists --dbname $(sudo openproject config:get DATABASE_URL) /var/db/openproject/backup/postgresql-dump-20210419151456.pgdump

Please change the manual, as it would be life-saver for people with no deep knowledge of dbases and so on.

Maybe advanced admins can understand that but simpletons like myself need the step by step, correct instructions :)

Cheers,

Piotr

  • (1 - 1/1)
Loading...