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

Change mtime to mmin in find command? #4

Open
Mondane opened this issue May 31, 2015 · 8 comments
Open

Change mtime to mmin in find command? #4

Mondane opened this issue May 31, 2015 · 8 comments
Assignees

Comments

@Mondane
Copy link
Owner

Mondane commented May 31, 2015

Based on http://unix.stackexchange.com/questions/92346/why-does-find-mtime-1-only-return-files-older-than-2-days

I'm thinking of changing the mtime parameter in the find commands to mmin to have a better selection of files. This would hopefully improve the hourly and daily rotate so not several backups from the same day are saved.

@rossica , what do you think about this?

@Mondane
Copy link
Owner Author

Mondane commented Nov 23, 2015

@rossica , I've changed the code to mmin, see https://github.com/Mondane/timebackup/tree/feature/4_mtime-to-mmin . You are welcome to test it too.

@Mondane Mondane self-assigned this Nov 23, 2015
@rossica
Copy link
Contributor

rossica commented Dec 13, 2015

Reading the stackexchange question and looking at the script code, this looks like a good change.
I'm putting it into 'production' and will see how it turns out.

@rossica
Copy link
Contributor

rossica commented Dec 13, 2015

@Mondane One more thing: You might want to store "60*24" in a constant for better readability in all the places where you have doing multiplication for -mmin.

@rossica
Copy link
Contributor

rossica commented Jan 10, 2016

I'm noticing in my deployment that the daily rotation folder is deleting every other backup.
So for my once-daily backups, I see Jan 4th, Jan 6th, and Jan 8th, with Jan 3rd rotated to the weekly folder.

@Mondane
Copy link
Owner Author

Mondane commented Jan 11, 2016

I'll have a look into it sometime. It's a part I find difficult to wrap my
head around.

2016-01-10 21:16 GMT+01:00 rossica [email protected]:

I'm noticing in my deployment that the daily rotation folder is deleting
every other backup.
So for my once-daily backups, I see Jan 4th, Jan 6th, and Jan 8th, with
Jan 3rd rotated to the weekly folder.


Reply to this email directly or view it on GitHub
#4 (comment).

@OferLapid
Copy link

Is this package ready for use by non technical users?
I would love a short explanation on setup and usage
Thanks!

@Mondane
Copy link
Owner Author

Mondane commented Apr 16, 2017

@OferLapid since this is unrelated from mmtime, see #5

@rossica
Copy link
Contributor

rossica commented Mar 18, 2018

Another thing I've noticed with the mmin change is that if I go a long period of time without a backup, the script deletes ALL previous versions and only keeps the latest one. This is generally undesirable because some history is preferred over none, and my understanding of the purpose of deleting older backups is to save space.
Maybe a minimum number of backups to keep at each rotation level should be maintained?

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

No branches or pull requests

3 participants