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

Group active backing up images to DATE not SUBVOLUME. #236

Open
DL6AKU opened this issue Jun 8, 2018 · 4 comments
Open

Group active backing up images to DATE not SUBVOLUME. #236

DL6AKU opened this issue Jun 8, 2018 · 4 comments

Comments

@DL6AKU
Copy link

DL6AKU commented Jun 8, 2018

As an experiment I recently switched to btrbk snapshots every 5 minutes from 60 minutes. When I run the nightly "send all my backups to my servers backup disk" it takes a lot longer of course, as estimated.

I have four subvolumes that are being backed up: root, home, boot and data. On root is my OS, on home is /home, on boot I rsync -avr --delete my /boot (ext2) drive before every backup and on /data is my Music and Movie collection.

So with my backups taking a lot longer now to the external file server and my data being seperated in this way, I noticed that btrbk is syncing snapshots first by name and only then by date, like this:

root_at_time_1
root_at_time_2
root_at_time_3
root_at_time_4
home_at_time_1
home_at_time_2
home_at_time_3
home_at_time_4
boot_at_time_1
boot_at_time_2
boot_at_time_3
boot_at_time_4
data_at_time_1
data_at_time_2
data_at_time_3
data_at_time_4

It would be better for consistency if it was in this order:

root_at_time_1
home_at_time_1
boot_at_time_1
data_at_time_1
root_at_time_2
home_at_time_2
boot_at_time_2
data_at_time_2
root_at_time_3
home_at_time_3
boot_at_time_3
data_at_time_3
root_at_time_4
home_at_time_4
boot_at_time_4
data_at_time_4
@DL6AKU
Copy link
Author

DL6AKU commented Jun 8, 2018

Also I am sorry for ALL CAPS, I just don't know how to highlight words in a caption. Not intended to be interpreted as shouting :)

@digint
Copy link
Owner

digint commented Jun 14, 2018

I'm afraid this is not easily doable. The main reason why it is implemented like this is to have an abort condition per source subvolume (if first backup fails, abort all consequent ones), which would make things a bit more complicated when resorting.

I'll leave this issue open as feature request, maybe it will be considered for a refactoring some day.

@ghost
Copy link

ghost commented Jul 17, 2018

Why not simply change your backup script to the n numbers before the name?

at_time_1_home

@OndrejPopp
Copy link

OndrejPopp commented May 1, 2021

Ok.. three years later 😃 I would like to have DATE or (time stamp) as an additional snapshot subdirectory so in the above example,
snapshot_dir/time_1/{root,home,boot, data}
snapshot_dir/time_2/{root,home,boot,data}
etc..

This is in my opinion much cleaner than a big list of subvolume.timestamp names, especially when you have a lot of subvolumes and timestamps...

I have been looking at a similar enhancement request, #304 and seeing the patch over there I think I can put this together myself.

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

No branches or pull requests

3 participants