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

Configurable Automatic Wallet Backup #306

Merged
merged 14 commits into from
Apr 13, 2015

Conversation

crowning-
Copy link

Reference: https://dashtalk.org/threads/v0-11-2-x-testing.4202/page-37#post-50915

I have implemented automatic wallet backups so in case wallet.dat gets corrupted beyond repair the user has the possibility to restore the file from one of the backups.

How it works:

  1. new parameter -createwalletbackups=n with 0 <= n <= 10, default: 10 (Number of backups)
  2. a folder "backups" is created in the folder where wallet.dat normally is
  3. during the start of the wallet (before wallet.dat is used by the application) a copy of wallet.dat is created in this folder with the name wallet.dat.+timestamp. This is logged to debug.log
  4. if there are more than "n" backups the oldest ones are deleted (also logged)
  5. the minimum interval between backups is 1 minute
  6. createwalletbackups=0 disables backups, but keeps existing ones in the "backups" folder
  7. new menu "Tools->Show Automatic Backups" opens the operation-system's default file-browser and shows the files and allows the user to copy them somewhere else.
  8. I have added a new icon "browse.png" to the resources. Right now it's identical to the "filesave" icon, but can easily be replaced when someone comes up with something better.

Tests are done under several flavours of Linux, Windows (by yours truly) and OSX (thanks @UdjinM6 👍), and it builds with Gitian without problems.

By default automatic backups are switch ON and set to 10 backups. My reasoning behind this (instead of having it OFF by default):

  • Users who already know what they are doing know how to switch it off. They also know how to make a backup "by hand", so they are not the target group.
  • Newbs who have no idea what they are doing are the ones which need a backup most when things go South. And they won't switch it on until explicitly told so. Search for threads (currency-independent) on BCT where users lost/corrupted their wallets...almost always beginners.
  • Disk-space is cheap, Dash not.

This is how it looks UI-wise:
backups

@UdjinM6
Copy link

UdjinM6 commented Apr 12, 2015

Tested and works as expected on Mac OS X 10.10.3

Great job! 👍

eduffield222 pushed a commit that referenced this pull request Apr 13, 2015
Configurable Automatic Wallet Backup
@eduffield222 eduffield222 merged commit 73b831c into dashpay:master Apr 13, 2015
@eduffield222
Copy link

Great work!

andvgal referenced this pull request in energicryptocurrency/gen2-energi Dec 26, 2018
Fixed missing optimization

Closes #306

See merge request energi/cryptocurrency/core/energi!298
kwvg pushed a commit to kwvg/dash that referenced this pull request Dec 21, 2022
…pay#306)

Bumps [engine.io](https://github.com/socketio/engine.io) from 4.1.1 to 4.1.2.
- [Release notes](https://github.com/socketio/engine.io/releases)
- [Changelog](https://github.com/socketio/engine.io/blob/4.1.2/CHANGELOG.md)
- [Commits](socketio/engine.io@4.1.1...4.1.2)

---
updated-dependencies:
- dependency-name: engine.io
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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.

None yet

3 participants