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

how to use newest snapshot instead of oldest in rotation? #100

Open
mathieuchateau opened this issue Jul 19, 2015 · 6 comments
Open

how to use newest snapshot instead of oldest in rotation? #100

mathieuchateau opened this issue Jul 19, 2015 · 6 comments
Labels

Comments

@mathieuchateau
Copy link

Hello,

When using tool to make backup, we generally want something like:
-1 backup per day (let's say 7 for 1 week)
-1 backup per month (first or last day of month, choose date)

As far as I understand, rsnapshot will rotate the oldest per day backup to make the first per month backup. So I won't have a monthly backup that match what was present on 1st day of the month (or whatever day I started rsnapshot with monthly argument).

I could use 2 specific config files so they ignore each other but I won't have benefit of hardlink between the two (and so basically host twice full data).

Anyway to achieve that?

I know it's question and not directly issue but couldn't find a support mailing list from here.

Thanks in advance,

Mathieu Chateau

@mathieuchateau mathieuchateau changed the title how to use newest snapshot instead of older in rotation? how to use newest snapshot instead of oldest in rotation? Jul 19, 2015
@bebehei
Copy link
Contributor

bebehei commented Jul 20, 2015

Mhmm. That's a good question. TBH I can't answer this right now perfectly. I'm quite fresh to the rsnapshot sourcecode.

I know it's question and not directly issue but couldn't find a support mailing list from here.

I added the link in the project-description. Use rsnapshot-discuss (sadly we are still on sourceforge with the mailinglists.)

In general, there are a bunch of experienced people around there.

@bebehei
Copy link
Contributor

bebehei commented Jul 20, 2015

Please let this bug report open and post your solution, if you'll get one.

Maybe we have to "convert" this bug report into a feature request 😉

@mathieuchateau
Copy link
Author

I did not receive git mail after your reply sorry. Suscribing now to the list

@sgpinkus
Copy link
Member

Did this make it to the mailing list?

As far as I understand, rsnapshot will rotate the oldest per day backup to make the first per month backup. So I won't have a monthly backup that match what was present on 1st day of the month (or whatever day I started rsnapshot with monthly argument).

That's correct. I guess the thinking is, in theory you have the first month in fine resolution already.

I could use 2 specific config files so they ignore each other but I won't have benefit of hardlink between the two (and so basically host twice full data).

You won't have to host twice full data even if you did use two config files. The rotation stuff is fairly trivial (AFAIK). You could also just do what rsnapshot does yourself. Rsnapshot does this:

/bin/cp -al /backups/.sync /tmp/backups/alpha.0

You do this straight after the sync every month (Making sure your locking not stepping on rsnapshots toes):

/bin/cp -al /backups/.sync /backups/mymonthly.0
# your manual rotation goes here.

@saas2813
Copy link

saas2813 commented Mar 1, 2017

I'd really like to have this feature also.

@saas2813
Copy link

saas2813 commented Mar 6, 2017

If I try to make a patch for this will someone integrate it?

A bit of the point of using rsnapshot is to avoid the possible bugs while implementing rotation once again manually...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants