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

Docs: improve the backup section for v2.0 #5431

Merged
merged 2 commits into from
Mar 14, 2022

Conversation

sphuber
Copy link
Contributor

@sphuber sphuber commented Mar 12, 2022

Fixes #4853
Fixes #2603

With AiiDA v2.0 the repository is now provided by the disk-objectstore
which is optimized for being backed up with rsync. This means the old
custom implementation of backing it up is no longer necessary nor
supported. It can now simply be backed up using rsync.

The instructions are updated and improved by tying the backup procedure
to the storage backend used for the profile. This will allow to have
other instructions for other storage backends in the future, as they
will most likely not be the same.

@sphuber sphuber force-pushed the fix/4853/docs-backup branch from f26ad00 to eace281 Compare March 12, 2022 12:52
@sphuber sphuber added the pr/on-hold PR should not be merged label Mar 12, 2022
@sphuber
Copy link
Contributor Author

sphuber commented Mar 12, 2022

This should be merged after the release of v2.0.0b1

@sphuber sphuber force-pushed the fix/4853/docs-backup branch 2 times, most recently from 93e26d4 to d35b3e1 Compare March 12, 2022 17:50
@chrisjsewell
Copy link
Member

This should be merged after the release of v2.0.0b1

Thanks but why do you say this?
You know that the current documentation is currently set to 1.6.7 as latest? https://aiida.readthedocs.io/projects/aiida-core/en/latest/
and users can select other versions of the documentation

All the documentation on the release of v2.0.0b1 should relate to that version, and I would also like to link to this in the change log.
I would recommend having an additional note admonition for "django/sqlalchemy (legacy)", or similar, just mentioning that the backup would be identical to psql_dos

@sphuber
Copy link
Contributor Author

sphuber commented Mar 13, 2022

Thanks but why do you say this?

I added this when I realized that this is not the documentation that users should read when wanting to migrate to v2.0. As I later then realized and said in the Slack channel, we should simply add a link in the email that points to 1.6.7 instead of latest such that even when latest becomes the current develop, people will still get the correct documentation. So indeed this can be merged now.

All the documentation on the release of v2.0.0b1 should relate to that version, and I would also like to link to this in the change log. I would recommend having an additional note admonition for "django/sqlalchemy (legacy)", or similar, just mentioning that the backup would be identical to psql_dos

We could add the note for legacy backends, but it is not identical to psql_dos. At least you could use the same approach, but for large repo's that is not really feasible and so that is why there was this whole custom backup schema. This was only available in v1.x and has been removed in v2.x so it doesn't make sense to document this in v2.x. I would then maybe just in the v2.0 docs have a link to the old v1.6.x docs of how to use the old custom backup feature.

@sphuber sphuber removed the pr/on-hold PR should not be merged label Mar 13, 2022
@chrisjsewell
Copy link
Member

This was only available in v1.x and has been removed in v2.x

This feels confusing though.
If we are talking about them backing up before migrating a v1.x profile, then (a) won't they have v2.x installed, (b) if they have already used verdi then the config will have already been migrated, so actually it will point to the psql_dos backend name

With AiiDA v2.0 the repository is now provided by the `disk-objectstore`
which is optimized for being backed up with `rsync`. This means the old
custom implementation of backing it up is no longer necessary nor
supported. It can now simply be backed up using `rsync`.

The instructions are updated and improved by tying the backup procedure
to the storage backend used for the profile. This will allow to have
other instructions for other storage backends in the future, as they
will most likely not be the same.
@sphuber sphuber force-pushed the fix/4853/docs-backup branch from d35b3e1 to 1388bd3 Compare March 13, 2022 11:56
@sphuber
Copy link
Contributor Author

sphuber commented Mar 13, 2022

If we are talking about them backing up before migrating a v1.x profile, then (a) won't they have v2.x installed

Not necessarily. I guess we should in this case actually stress that if they use the old custom backup script for their backups, they should create a backup before installing v2.0.0b1, and only once the backup is complete, update their installation and environment.

(b) if they have already used verdi then the config will have already been migrated, so actually it will point to the psql_dos backend name

Yes, but they won't have run the migration yet, and so the suggested method for the psql_dos backup will be horrendously slow for mediumly sized database and everything above.

So conclusion: I think the only solution then is to make it clear in the email that people with large databases that have been using the custom backup script (if they have never used it, then there is no point, they might as well rsync it) should backup before installing v2.0. Not sure if we should then also incorporate this is in the documentation. In the backup section itself won't make much sense, because it might come too late and only read it after having updated the installation.

@chrisjsewell
Copy link
Member

I think the only solution then is to make it clear in the email that people with large databases that have been using the custom backup script (if they have never used it, then there is no point, they might as well rsync it) should backup before installing v2.0.

I feel then that this should also be added to #5426, as the "canonical" place for how to go from v1.6 -> v2.0, or add something on the wiki and link to that?
Obviously, not all people with a v1.6 database may get the email or read it, so should there should be a more "permanent" place for such information

Copy link
Member

@chrisjsewell chrisjsewell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still a question for me, of where to put the "canonical" instructions for backing up, before migrating a 1.6 database (#5431 (comment)).
But I don't think that blocks this 👍

@sphuber sphuber merged commit d711ea2 into aiidateam:develop Mar 14, 2022
@sphuber sphuber deleted the fix/4853/docs-backup branch March 14, 2022 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Docs: Backup Settings are Unclear script 'backup_postgresql.sh' - clarification
2 participants