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

Identify and execute solution for data-backup filename collisions #122

Open
grayside opened this issue Nov 13, 2017 · 0 comments
Open

Identify and execute solution for data-backup filename collisions #122

grayside opened this issue Nov 13, 2017 · 0 comments

Comments

@grayside
Copy link
Contributor

Problem

rig project data-backup names the backup file dev.tgz, and does so every time. This means users are required to manually rename or delete this file, and their first warning is when the data-backup throws a filesystem error on the name collision.

Label: HELP WANTED
This issue is a great opportunity to learn Golang, the contribution workflow of rig, and incidentally improve rig!

Label: QUESTION
This issue has the question label, meaning before we lay code we should have confirmation on the approach and remove the label. If you want to start on this while it's a question, think through this issue summary, consider the user impact (and the amount of time you have to explore a solution) and post your thoughts!

Solutions

Solution A

If rig data-backup detects dev.tgz already exists, roll that file to include the creation date of the file or a suffix digit, and set an info log to notify the user.

Solution B

  • Create an ~/.outrigger/backups directory.
  • Always include the backup datetime in the filename, e.g., ~/.outrigger/backups/{machine}-20171115171530.tgz
  • Create a symlink from dev.tgz to the most recent backup.

Solution C

???

Confirmation

Compilation

Use docker-compose run --rm compile to confirm your code compiles.

You can use the binary resulting from the compilation step (located in ./build/darwin/rig).

Functional Testing

  1. Create a backup.
  2. Restore the backup.
  3. Create a backup.
  4. Restore the backup.

Prepare for Pull Request

Use docker-compose run --rm lint to apply the full suite of static analysis tools. If there is a failure, you aren't done yet!

Bonus Round

Prompt the user when there are more than 3 backups so they realize they may want to clean up.

@grayside grayside changed the title Identify and execute solution for data-backup filename collissions Identify and execute solution for data-backup filename collisions Nov 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant