Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add retry to the backup process #60

Open
WadeBarnes opened this issue Aug 24, 2020 · 0 comments
Open

Add retry to the backup process #60

WadeBarnes opened this issue Aug 24, 2020 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@WadeBarnes
Copy link
Member

Occasionally a backup can run into an issue and fail on the first attempt. If attempted again a sort time later it will succeed.

For the sake of robustness add a configurable retry and delay to the backup process so backups are retried if they fail the first time.

Example backup failure:

Backing up 'wallet-indy-cat:5432/agent_indy_cat_wallet' to '/backups/daily/2020-08-22/wallet-indy-cat-agent_indy_cat_wallet_2020-08-22_01-05-02.sql.gz.in_progress' ...
--
  | pg_dump: Dumping the contents of table "items" failed: PQgetCopyData() failed.
  | pg_dump: Error message from server: server closed the connection unexpectedly
  | This probably means the server terminated abnormally
  | before or while processing the request.
  | pg_dump: The command was: COPY public.items (id, type, name, value, key) TO stdout;
  | removed '/backups/daily/2020-08-22/wallet-indy-cat-agent_indy_cat_wallet_2020-08-22_01-05-02.sql.gz.in_progress'
  | [!!ERROR!!] - Failed to backup wallet-indy-cat:5432/agent_indy_cat_wallet.
  |  
  | Elapsed time: 0h:25m:53s - Status Code: 1

The database server did not terminate. When the backup was retried it succeeded.

@WadeBarnes WadeBarnes added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed labels Aug 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant