Skip to content
New issue

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

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

Already on GitHub? # to your account

Add setting for users to determine frequency of backup creation #13199

Open
wants to merge 26 commits into
base: main
Choose a base branch
from

Conversation

farewelltospring
Copy link

@farewelltospring farewelltospring commented Oct 2, 2023

First time contributor checklist

Contributor checklist

  • Sony Xperia 5iii, Android 13
  • Virtual device Pixel 3, Android 13
  • My contribution is fully baked and ready to be merged as is
  • I ensure that all the open issues my contribution fixes are mentioned in the commit message of my first commit using the Fixes #1234 syntax

Description

This pull request allows users change the frequency that backups are made to a selected interval (weekly, monthly, quarterly, every 6 months, annually).

Currently, when backups are enabled, Signal will create a fresh backup every 24-hours. This causes unnecessary write cycles on the device's internal storage or SD card.

  • Making backups is a power-intensive process which drains battery and uses CPU cycles which can put a strain on daily usage when users are out and about, and slow down other apps on the device while the backups are being created.
  • Different users have different needs from backups. Some users message on Signal all day long, and others message on Signal infrequently. A 24-hour backup schedule is useful for the first group, but is of dubious value for the second group. It will write an identical file over and over.
  • Low-end devices are wearing out prematurely. Many low-end Android phones have low-durability eMMC chips. A 24-hour backup schedule makes their already-short lifespan even shorter. eMMC chips will fail catastrophically when they reach end-of-life. The device bricks, and the user must replace the whole thing. This disproportionately hurts Signal's poor users and produces environmental pollution.

A setting to control the backup frequency would also give people more control over their data, which is an important value to cultivate in today's society.

Verified that this behaviour works by setting backup frequency to 30 days and then waiting that long to see if a backup got created (I restarted the device several times during that time period to verify that it persists).

Screen_recording_20240111_000341.mp4

farewelltospring added 14 commits May 10, 2023 01:07
Yes I know this is bad practice but it's just for testing purposes
Rename OK button and add cancel button
Apparently it's a Unix timestamp in milliseconds and this took me way
too long to figure out myself
When changing backup frequency settings, schedule the next backup using
the new setting, but relative to the timestamp of the latest backup,
instead of immediately.

This ensures that backups are not created too frequently. A backup will
only be immediately created if the latest backup was too long ago,
relative to the new frequency setting, or if there is no latest backup.
Copy link

stale bot commented Dec 1, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Dec 1, 2023
farewelltospring added 3 commits December 3, 2023 01:24
- Replace debug toast with debug log statement
- Use MaterialAlertDialog instead of boring AlertDialog
@stale stale bot removed the wontfix label Dec 3, 2023
@farewelltospring
Copy link
Author

Fixed the localisation issue. I have only added a string for English but at least there are resources now.

farewelltospring added 2 commits December 4, 2023 01:22
Just because the plural has a single manifestation in English doesn't
mean we don't need to have plurals for it in other languages.
@farewelltospring
Copy link
Author

Is there anything I can do to make this PR better?

@farewelltospring
Copy link
Author

farewelltospring commented Jan 11, 2024

Added a video recording demonstrating the feature. (link)

Copy link

stale bot commented Mar 12, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Mar 12, 2024
@stale stale bot removed the wontfix label Mar 12, 2024
@LordBurtz
Copy link

@farewelltospring one suggestions, could you please add the option to put the number of days as an int (with sensible limits) as having to choose from a list feels arbitrary and might not cover all use cases, but I can totally understand if you keep it as is

  • i really like that feature

@farewelltospring
Copy link
Author

Just caught wind of this commit - 49ba83d - is this PR able to be resolved?

farewelltospring added 2 commits June 25, 2024 04:15
There's some kind of divergence in the parallel implementation that the
people at Signal are doing instead of just merging my code (sadface),
which caused some lossy merge conflicts. This fixes it and restores my
version of slow backups to full functionality.
Copy link

stale bot commented Aug 26, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Aug 26, 2024
@stale stale bot removed the wontfix label Aug 27, 2024
@EmoBurrito
Copy link

Bumping because I'm genuinely surprised this functionality isn't present and I don't want this to be forgotten. I'm not copying my backup elsewhere daily, so there's no point in wasting power and slowing down my phone that frequently.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants