-
Notifications
You must be signed in to change notification settings - Fork 25
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 support for importing rsync-time-backup backups. #65
Conversation
Codecov ReportAttention:
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #65 +/- ##
==========================================
- Coverage 20.18% 16.60% -3.58%
==========================================
Files 7 8 +1
Lines 218 277 +59
Branches 33 43 +10
==========================================
+ Hits 44 46 +2
- Misses 173 230 +57
Partials 1 1 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some small nitpicks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
datetime tests are somehow confusing.
some suggestions so that rhs and lhs of asserts precisely match.
It's been 5 months, and I am finally in a position to continue importing my backups. With your requested changes applied, I've been using I can't remember if you wanted more changes- I'll have to check my IRC logs from around those dates. Happy to add any more requested changes of course. But just wanted to confirm that after several months of leaving it alone, my changes are working just fine for me. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
rsync-time-backup was my previous preferred backup solution. You can import backups from this program just fine using
rsynchl
.However, for
rsync_tmbackup
, archives timestamps are better derived from each folder name rather than foldermtime
. Since folder names are timestamps, I mandate using--prefix
.Additionally, thanks to parsing times from folder names, this PR marks the first use of
datetime_from_string
outside of tests. I modifieddatetime_from_string
to return UTC-awaredatetime
s. There are at least two issues with usingstrptime
for awaredatetime
s:%Z
, except for small number of cases.%Z
parses successfully, only%z
returns a timezone-awaredatetime
.Therefore, I improvised to make
%a %b %d %H:%M:%S %Z %Y
formatting (the only supported format w/ a time zone) to return a UTC-aware timestamp. If you don't like this at all, I'm open to changing it.