Comments (5)
As you already mentioned, "list snapshots" is the closest. It actually shows the same data as the "tree" command in v0.20.0, but in a table format instead of a tree (you can see the up-to-date flag in the status column).
After having implemented all those nice tables, I kind of forgot how much more readable the "tree" output was compared to the more data-analysis-style "list subvolumes". I used to append the "tree" output in my status emails, but after some months of usage it got so big that it did no make much sense for me any more, but this is of course not necessarily true for others.
Furthermore, the "tree" command did not really print the whole tree (more specifically: it does not show the orphaned backups), that's why it got renamed to "list snapshots", making it clear for the user that he should run "list backups" to get the full story.
Actually, I don't really need the full "tree" output. I would really like to see, for each source_subvol, how many snapshot_subvol's there are for it, and the name of the most recent one (whether it is up to date or not would be useful as well).
I agree that something like this would make much sense, as many times you are not interested in the backups, but only the snapshots, in order to get a quick overview of your source systems.
The same would also make some sense for the backup side.
That said, I'm wondering how such commands should be named. e.g. btrbk tree snapshots
and btrbk tree backups
? Sounds a bit confusing...
Or maybe better rename current btrbk list snapshots/backups
to btrbk resolve snapshots/backups
, and have btrbk list snapshots
just print the snapshot list, without its related backups? Any ideas?
from btrbk.
In the meantime, I have created a quick and dirty awk script to get the information I want from the "list snapshots --format=long
" output. It doesn't handle spaces in filenames (a real solution would use the "raw" format output) but it meets my immediate need. Included below in case it is useful to anyone else.
/^snapshot/ {
if ($3 != current_source_path) {
if (current_source_path != "") print "Source path", current_source_path, "has", snapshots, "snapshots", status;
current_source_path = $3;
status = "";
snapshots = 0;
}
snapshots++; total_snapshots++;
if ($5 != "-") status = "and is " $5;
}
END {
if (current_source_path != "") print "Source path", current_source_path, "has", snapshots, "snapshots", status;
print "Total snapshots =", total_snapshots;
}
from btrbk.
Thanks for your reply (which I saw after I posted my comment above).
I may not be the best person to comment on naming as I only use the snapshot functionality for now ("list backups" displays nothing for me). However, my thought was to add a "--format=tree" (for the old tree output) and/or a "--format=summary" (for the sort of summary my awk script gives). Maybe those could work both for snapshots and for backups.
In any case, thanks for thinking about this!
from btrbk.
Just played around with your awk script, having this kind of statistics would be very useful! I opened a new issue #55 for this.
I leave this issue open for further discussion of the tree-style output.
from btrbk.
As btrbk now has statistics support, and all information can be displayed using list snapshots
and list backups
, the old btrbk tree
gets obsolete.
from btrbk.
Related Issues (20)
- Clean interrupted ssh transfers
- Prevent incomplete backups from blocking progress
- Is it safe to dedupe snapshots on the server and the client?
- Is my configuration wrong? I keep getting snapshots in the wrong folder HOT 6
- Failed to fetch subvolume detail for snapshot_dir HOT 1
- Double daily backups sometimes... HOT 1
- understanding target_preserve_min
- Is 650 GB per day between hard disks connected by 1 GBit ethernet ok? HOT 1
- Feature request : BTRBK + grub-btrfs - Restore the snapshot currently booted - like Timeshift
- Why is btrbk only creating snapshots and not transfering?
- dry-run ignores lock
- whatever default shell is used despite it is not a posix compatible shell
- Not optimal behavior for low quality network connections
- [Question] How to specify clone sources from snapshots of other unrelated subvolumes?
- ERROR: ... unable to destroy quota group: Device or resource busy
- ERROR: clone: did not find source subvol HOT 4
- Question: duplicated instance when /etc/crontab set to run hourly at 00 minute HOT 1
- [Question] Quarterly retention
- [Feature Request] configurable timestamps / names for snapshots
- snapshot_dir required even when `snapshot_create` set to `no`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from btrbk.