Git Product home page Git Product logo

kimono-koans / httm Goto Github PK

View Code? Open in Web Editor NEW
1.2K 10.0 28.0 3.11 MB

Interactive, file-level Time Machine-like tool for ZFS/btrfs/nilfs2 (and even actual Time Machine backups!)

Home Page: https://crates.io/crates/httm

License: Mozilla Public License 2.0

Shell 13.24% Rust 82.93% Roff 3.33% Handlebars 0.51%
zfs rust unix-shell unix unix-command zsh zfs-snapshots zfsonlinux zfsonroot command-line-tool

httm's People

Contributors

chenrui333 avatar keltia avatar kimono-koans avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

httm's Issues

zsh keybindings: install as subcommand of httm

httm should provide an option to create the keybindings file somewhere and source it from the user's .zshrc.

e.g. create $XDG_CONFIG/httm, put the zsh keybindings there, and append source $XDG_CONFIG/httm/zsh-keybindings.zsh to .zshrc

Installation instructions for Debian 11?

Hi there,

I just found this project, saw the .deb files and gave it a try:

dpkg -i httm_0.10.10_amd64.deb                                                                                                           
Selecting previously unselected package httm.                                                                                                        
(Reading database ... 96445 files and directories currently installed.)                                                                              
Preparing to unpack httm_0.10.10_amd64.deb ...                                                                                                       
Unpacking httm (0.10.10) ...                                                                                                                         
dpkg: dependency problems prevent configuration of httm:                                                                                             
 httm depends on libc6 (>= 2.34); however:                                                                                                           
  Version of libc6:amd64 on system is 2.31-13+deb11u3.                                                                                               
                                                                                                                                                     
dpkg: error processing package httm (--install):                                                                                                     
 dependency problems - leaving unconfigured                                                                                                          
Processing triggers for man-db (2.9.4-2) ...                                                                                                         
Errors were encountered while processing:                                                                                                            
 httm                                                   
apt-cache policy libc6                                                                                                                   
libc6:                                                                                                                                               
  Installed: 2.31-13+deb11u3                                                                                                                         
  Candidate: 2.31-13+deb11u3                                                                                                                         
  Version table:                                                                                                                                     
 *** 2.31-13+deb11u3 500                                                                                                                             
        500 http://ftp.de.debian.org/debian bullseye/main amd64 Packages                                                                             
        100 /var/lib/dpkg/status  

Does this mean it will only work on Ubuntu and not Debian 11?

LTSP support

We use ZFS on our LTSP server, which is configured so that each users home dir has its own dataset. Users are able to access files in their home dir snapshots via the .zfs special directory but unfortunately httm doesn't work when run on the LTSP clients directly, they get the error:

Error: httm could not find any valid datasets on the system

The workaround is for users to ssh into the LTSP server, then httm works as expected but it'd be nice if users could use httm on LTSP clients without having to ssh into the server first.

Release 0.13.0 does not compile

When attempting to build from source:

   Compiling httm v0.13.0 (/home/me/httm)
error[E0716]: temporary value dropped while borrowed
   --> src/utility.rs:286:26
    |
286 |     let mut out_locked = std::io::stdout().lock();
    |                          ^^^^^^^^^^^^^^^^^       - temporary value is freed at the end of this statement
    |                          |
    |                          creates a temporary which is freed while still in use
287 |     write!(out_locked, "{}", output_buf)?;
    |     ------------------------------------ borrow later used here
    |
    = note: consider using a `let` binding to create a longer lived value

For more information about this error, try `rustc --explain E0716`.
error: could not compile `httm` due to previous error
cargo-deb: build failed

Fallback support to find snapshots from defined directory

Is your feature request related to a problem? Please describe.
I'm using btrfs/snapper with config SYNC_ACL="yes", which make .snapshots directory readable for my regular user account.
But httm still require root privilege to list snapshots because my user can't call btrfs subvolume show command.

Describe the solution you'd like
Fallback to from_defined_mounts(...) path to find snapshots if user don't have root privilege.
On my situation, this code path works and httm lists snapshots.
(I'm using httm with a modification that always use this code path and it seems to work.)

Describe alternatives you've considered
Alternatively, if httm has command line option to tell it to use that code path, I could use it to get snapshots.

Additional context

Cannot install on F37

Describe the bug
On Fedora 37 the installation is impossible as it collides with the filesystem package.

Reproduce

$ dnf install https://github.com/kimono-koans/httm/releases/download/0.19.2/httm-0.19.2-2.x86_64.rpm
Last metadata expiration check: 0:08:47 ago on Tue Jan 17 16:04:00 2023.
httm-0.19.2-2.x86_64.rpm                                                                                                    2.9 MB/s | 1.6 MB     00:00    
Dependencies resolved.
============================================================================================================================================================
 Package                          Architecture                       Version                                 Repository                                Size
============================================================================================================================================================
Installing:
 httm                             x86_64                             0.19.2-2                                @commandline                             1.6 M

Transaction Summary
============================================================================================================================================================
Install  1 Package

Total size: 1.6 M
Installed size: 4.1 M
Is this ok [y/N]: y
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Error: Transaction test error:
  file /usr/bin from install of httm-0.19.2-2.x86_64 conflicts with file from package filesystem-3.18-2.fc37.x86_64

Only one version listed on snapper/btrfs using sudo

Describe the bug
When trying to run httm on a file only one version is displayed. This is on btrfs using snapper automatic snapshots (hourly)

To Reproduce
Steps to reproduce the behavior:

  1. sudo /usr/bin/httm ~/.zshrc
  2. see only one version listed (presumably corresponding to the current version).

Expected behavior
Expected different versions listed corresponding to the (many) snapshots created automatically with snapper

Additional context

  • httm version 0.29.7 (via provided deb)
  • OS: [e.g. Ubuntu 23.04]
  • Relevant filesystem/s: btrfs, snapper
  • httm --debug output: Doesn't terminate (?)

.deb packages provided cannot install on Ubuntu 20.04

I tried using the provided .deb packages on an Ubuntu 20.04 server; neither the 0.13.0 nor 0.12.11 packages could be installed due to version conflict with libc.

dpkg: dependency problems prevent configuration of httm:
 httm depends on libc6 (>= 2.34); however:
  Version of libc6:amd64 on system is 2.31-0ubuntu9.9.

When built directly from the packaged source, 0.12.11 worked fine; the method I used was downloading the source from the 0.12.11 release, apt install cargo, then cargo deb followed by dpkg -i on the freshly built local package.

`--preview` does not work

Love this utility, it's really neat! Unfortunately --preview doesn't seem to work? I just built 0.17.4 using a custom fork of nixpkgs, and running httm --preview -s looks like this:

image

Then after selecting a file that changed, this is the next screen:

image

As you can see, there's no diff shown. Could this be because of custom FZF settings? Other settings don't seem to influence the appearance of httm (I have a custom cursor for example), but maybe that's a potential source of bugs. I tried just --preview as well as custom commands (--preview='delta {snap_file} {live_file}' and --preview='diff {snap_file} {live_file}'), none seemed to work. Any idea why not?

PS: Maybe if no arguments are specified in --preview, assume that the command just takes arguments in diff order?

readme mentions illumos/solaris but this does not seem to build

Before you begin

  1. Have you tried with the latest version of httm?

Yes

  1. Have you read the README and/or the help (httm -h or man httm)?

README, yes, man page, no.

  1. Is this actually a bug report?

Sort of? I was not really expecting it to build/run.

Removing the reference to illumos (did not try on actual solaris as I have no access to that) from the README is probably OK.

Describe the bug
httm fails to build, more specifically I think (not super familiar with rust) a dependent crate. (I think xattr)

To Reproduce
Steps to reproduce the behavior:

  1. boot a illumos system (I tried omnios)
  2. Install rust, gcc, ...
  3. run cargo install --git https://github.com/kimono-koans/httm.git --tag 0.30.0

Expected behavior
It to build as illumos was mentioned in the README

Screenshots
N/a but I have the output from cargo install

    Updating git repository `https://github.com/kimono-koans/httm.git`
  Installing httm v0.30.0 (https://github.com/kimono-koans/httm.git?tag=0.30.0#2e60aceb)
    Updating git repository `https://github.com/kimono-koans/timer.rs`
    Updating crates.io index
  Downloaded aho-corasick v1.0.4
  Downloaded scopeguard v1.2.0
  Downloaded errno v0.3.2
  Downloaded shlex v1.1.0
  Downloaded strsim v0.10.0
  Downloaded fuzzy-muff v0.3.10
  Downloaded thread_local v1.1.7
  Downloaded derive_builder_macro v0.12.0
  Downloaded darling_macro v0.14.4
  Downloaded memoffset v0.9.0
  Downloaded fnv v1.0.7
  Downloaded ident_case v1.0.1
  Downloaded utf8parse v0.2.1
  Downloaded number_prefix v0.4.0
  Downloaded dirs-next v2.0.0
  Downloaded simd-adler32 v0.3.7
  Downloaded static_assertions v1.1.0
  Downloaded itoa v1.0.9
  Downloaded lazy_static v1.4.0
  Downloaded cfg-if v1.0.0
  Downloaded iana-time-zone v0.1.57
  Downloaded version_check v0.9.4
  Downloaded env_logger v0.10.0
  Downloaded clap_lex v0.2.4
  Downloaded xattr v1.0.1
  Downloaded filetime v0.2.22
  Downloaded partition-identity v0.3.0
  Downloaded vte_generate_state_changes v0.1.1
  Downloaded is-terminal v0.4.9
  Downloaded which v4.4.0
  Downloaded deranged v0.3.8
  Downloaded dirs-sys-next v0.1.2
  Downloaded num_threads v0.1.6
  Downloaded atty v0.2.14
  Downloaded equivalent v1.0.1
  Downloaded crossbeam-deque v0.8.3
  Downloaded autocfg v1.1.0
  Downloaded termcolor v1.2.0
  Downloaded quote v1.0.33
  Downloaded terminal_size v0.2.6
  Downloaded defer-drop v1.3.0
  Downloaded proc-mounts v0.3.0
  Downloaded thiserror-impl v1.0.47
  Downloaded bitflags v2.4.0
  Downloaded os_str_bytes v6.5.1
  Downloaded time-core v0.1.1
  Downloaded humantime v2.1.0
  Downloaded derive_builder_core v0.12.0
  Downloaded time-macros v0.2.12
  Downloaded either v1.9.0
  Downloaded thiserror v1.0.47
  Downloaded lscolors v0.14.0
  Downloaded nu-ansi-term v0.47.0
  Downloaded darling v0.14.4
  Downloaded bitflags v1.3.2
  Downloaded crossbeam-utils v0.8.16
  Downloaded log v0.4.20
  Downloaded unicode-width v0.1.10
  Downloaded num_cpus v1.16.0
  Downloaded ahash v0.8.3
  Downloaded ryu v1.0.15
  Downloaded vte v0.11.1
  Downloaded crossbeam-epoch v0.9.15
  Downloaded console v0.15.7
  Downloaded unicode-ident v1.0.11
  Downloaded derive_builder v0.12.0
  Downloaded darling_core v0.14.4
  Downloaded indexmap v1.9.3
  Downloaded textwrap v0.16.0
  Downloaded tuikit v0.5.0
  Downloaded memchr v2.5.0
  Downloaded once_cell v1.18.0
  Downloaded num-traits v0.2.16
  Downloaded crossbeam-channel v0.5.8
  Downloaded proc-macro2 v1.0.66
  Downloaded term v0.7.0
  Downloaded indexmap v2.0.0
  Downloaded rayon-core v1.11.0
  Downloaded serde v1.0.171
  Downloaded indicatif v0.17.6
  Downloaded libc v0.2.147
  Downloaded hashbrown v0.14.0
  Downloaded portable-atomic v1.4.2
  Downloaded two_percent v0.10.19
  Downloaded time v0.3.26
  Downloaded serde_json v1.0.105
  Downloaded hashbrown v0.12.3
  Downloaded rayon v1.7.0
  Downloaded clap v3.2.25
  Downloaded chrono v0.4.26
  Downloaded syn v1.0.109
  Downloaded nix v0.26.2
  Downloaded rustix v0.38.8
  Downloaded regex-automata v0.3.6
  Downloaded rustix v0.37.23
  Downloaded regex-syntax v0.7.4
  Downloaded syn v2.0.29
  Downloaded nix v0.24.3
  Downloaded regex v1.9.3
  Downloaded io-lifetimes v1.0.11
  Downloaded 100 crates (7.1 MB) in 1.49s
   Compiling libc v0.2.147
   Compiling autocfg v1.1.0
   Compiling cfg-if v1.0.0
   Compiling proc-macro2 v1.0.66
   Compiling unicode-ident v1.0.11
   Compiling crossbeam-utils v0.8.16
   Compiling syn v1.0.109
   Compiling once_cell v1.18.0
   Compiling scopeguard v1.2.0
   Compiling fnv v1.0.7
   Compiling memchr v2.5.0
   Compiling bitflags v1.3.2
   Compiling rayon-core v1.11.0
   Compiling ident_case v1.0.1
   Compiling strsim v0.10.0
   Compiling either v1.9.0
   Compiling version_check v0.9.4
   Compiling rustix v0.38.8
   Compiling regex-syntax v0.7.4
   Compiling thiserror v1.0.47
   Compiling io-lifetimes v1.0.11
   Compiling lazy_static v1.4.0
   Compiling memoffset v0.9.0
   Compiling crossbeam-epoch v0.9.15
   Compiling num-traits v0.2.16
   Compiling ahash v0.8.3
   Compiling indexmap v1.9.3
   Compiling bitflags v2.4.0
   Compiling crossbeam-channel v0.5.8
   Compiling aho-corasick v1.0.4
   Compiling quote v1.0.33
   Compiling num_cpus v1.16.0
   Compiling errno v0.3.2
   Compiling crossbeam-deque v0.8.3
   Compiling dirs-sys-next v0.1.2
   Compiling syn v2.0.29
   Compiling dirs-next v2.0.0
   Compiling os_str_bytes v6.5.1
   Compiling rayon v1.7.0
   Compiling termcolor v1.2.0
   Compiling itoa v1.0.9
   Compiling regex-automata v0.3.6
   Compiling log v0.4.20
   Compiling iana-time-zone v0.1.57
   Compiling portable-atomic v1.4.2
   Compiling hashbrown v0.12.3
   Compiling rustix v0.37.23
   Compiling serde v1.0.171
   Compiling chrono v0.4.26
   Compiling clap_lex v0.2.4
   Compiling is-terminal v0.4.9
   Compiling term v0.7.0
   Compiling vte_generate_state_changes v0.1.1
   Compiling nix v0.24.3
   Compiling atty v0.2.14
   Compiling darling_core v0.14.4
   Compiling thread_local v1.1.7
   Compiling thiserror-impl v1.0.47
   Compiling hashbrown v0.14.0
   Compiling regex v1.9.3
   Compiling static_assertions v1.1.0
   Compiling deranged v0.3.8
   Compiling unicode-width v0.1.10
   Compiling time-core v0.1.1
   Compiling utf8parse v0.2.1
   Compiling equivalent v1.0.1
   Compiling num_threads v0.1.6
   Compiling textwrap v0.16.0
   Compiling serde_json v1.0.105
   Compiling humantime v2.1.0
   Compiling time v0.3.26
   Compiling env_logger v0.10.0
   Compiling clap v3.2.25
   Compiling indexmap v2.0.0
   Compiling darling_macro v0.14.4
   Compiling vte v0.11.1
   Compiling tuikit v0.5.0
   Compiling partition-identity v0.3.0
   Compiling nix v0.26.2
   Compiling darling v0.14.4
   Compiling derive_builder_core v0.12.0
   Compiling fuzzy-muff v0.3.10
   Compiling timer v0.2.0 (https://github.com/kimono-koans/timer.rs#4ba32a90)
   Compiling derive_builder_macro v0.12.0
   Compiling derive_builder v0.12.0
   Compiling defer-drop v1.3.0
   Compiling console v0.15.7
   Compiling nu-ansi-term v0.47.0
   Compiling number_prefix v0.4.0
   Compiling ryu v1.0.15
   Compiling shlex v1.1.0
   Compiling two_percent v0.10.19
   Compiling indicatif v0.17.6
   Compiling lscolors v0.14.0
   Compiling terminal_size v0.2.6
   Compiling proc-mounts v0.3.0
   Compiling which v4.4.0
   Compiling xattr v1.0.1
error[E0432]: unresolved import `crate::sys::ENOATTR`
  --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xattr-1.0.1/src/util.rs:13:5
   |
13 | use crate::sys::ENOATTR;
   |     ^^^^^^^^^^^^^^^^^^^ no `ENOATTR` in `sys`

error[E0432]: unresolved import `sys::XAttrs`
  --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xattr-1.0.1/src/lib.rs:40:15
   |
40 | pub use sys::{XAttrs, SUPPORTED_PLATFORM};
   |               ^^^^^^ no `XAttrs` in `sys`

error[E0425]: cannot find function `get_path` in module `sys`
  --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xattr-1.0.1/src/lib.rs:48:31
   |
48 |     util::extract_noattr(sys::get_path(path.as_ref(), name.as_ref()))
   |                               ^^^^^^^^ not found in `sys`

error[E0425]: cannot find function `set_path` in module `sys`
  --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xattr-1.0.1/src/lib.rs:57:10
   |
57 |     sys::set_path(path.as_ref(), name.as_ref(), value)
   |          ^^^^^^^^ not found in `sys`

error[E0425]: cannot find function `remove_path` in module `sys`
  --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xattr-1.0.1/src/lib.rs:66:10
   |
66 |     sys::remove_path(path.as_ref(), name.as_ref())
   |          ^^^^^^^^^^^ not found in `sys`

error[E0425]: cannot find function `list_path` in module `sys`
  --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xattr-1.0.1/src/lib.rs:77:10
   |
77 |     sys::list_path(path.as_ref())
   |          ^^^^^^^^^ not found in `sys`

error[E0425]: cannot find function `get_fd` in module `sys`
  --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xattr-1.0.1/src/lib.rs:87:35
   |
87 |         util::extract_noattr(sys::get_fd(self.as_raw_fd(), name.as_ref()))
   |                                   ^^^^^^ not found in `sys`

error[E0425]: cannot find function `set_fd` in module `sys`
  --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xattr-1.0.1/src/lib.rs:95:14
   |
95 |         sys::set_fd(self.as_raw_fd(), name.as_ref(), value)
   |              ^^^^^^ not found in `sys`

error[E0425]: cannot find function `remove_fd` in module `sys`
   --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xattr-1.0.1/src/lib.rs:103:14
    |
103 |         sys::remove_fd(self.as_raw_fd(), name.as_ref())
    |              ^^^^^^^^^ not found in `sys`

error[E0425]: cannot find function `list_fd` in module `sys`
   --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xattr-1.0.1/src/lib.rs:111:14
    |
111 |         sys::list_fd(self.as_raw_fd())
    |              ^^^^^^^ not found in `sys`

Some errors have detailed explanations: E0425, E0432.
For more information about an error, try `rustc --explain E0425`.
error: could not compile `xattr` (lib) due to 10 previous errors
warning: build failed, waiting for other jobs to finish...
error: failed to compile `httm v0.30.0 (https://github.com/kimono-koans/httm.git?tag=0.30.0#2e60aceb)`, intermediate artifacts can be found at `/tmp/cargo-install7TrNz1`

Additional context
Add any other context about the problem here. Perhaps you should include system details like:

  • OS: OmniOS bloody
  • Relevant filesystem/s: n/a

httm -d -R ~ High CPU Usage

Ubuntu 22.04 - AMD Ryzen 9 5950X 32GB RAM

When running "httm -d -R ~" CPU spikes and PC becomes unresponsive.

installed from httm_0.17.0_amd64.deb

Error in Arch PKGBUILD

==> Starting build()...
error: Found argument '-C' which wasn't expected, or isn't valid in this context

	If you tried to supply `-C` as a value rather than a flag, use `-- -C`

USAGE:
    cargo build [OPTIONS]

For more information try --help
==> ERROR: A failure occurred in build().
    Aborting...

NILFS2 support

NILFS2 is a mature log-structured file system, which supports snapshots. It's exclusively designed for flash devices only.
It's better suitable for low-end devices (e.g. phones, Raspberry Pi and other minicomputers) than ZFS and BTRFS. It requires less CPU and RAM than ZFS, and provides better read-write performance than BTRFS.
Similarly to BTRFS and ZFS, it saves the entire filesystem in a snapshot, so this tool would be a good fit.

feature request: live-preview of file content for text files in interactive mode

Like this: https://nickjanetakis.com/blog/using-fzf-to-preview-text-files-on-the-command-line-and-within-vim

Use case: the user has written any text file over some time. He has overwritten some past changes. He would like to check if the specific changes are contained in any of the snapshots of the file.

So something like:

  1. $ httm -r my_file.txt
  2. the snapshot selection and the preview window show up
  3. the preview pane shows the file in snapshotted state, and allows for some scrolling and such

Preview could use bat if it is installed to provide syntax highlighting, otherwise less

This could be extended to generate diffs between versions from different snapshots, but that is another story.

httm isn't portable across linux

The issue: ./httm: /lib/x86_64-linux-gnu/libm.so.6: version 'GLIBC_2.29' not found (required by ./httm)

Happens of officially supported debian/buster.

Is there any choice to compile it against musl instead of glibc or at least lower requirement to have only most recent version ?
It would be also pretty useful if utility would be truly statically compiled to avoid any dependencies that allows to use it across all Linuxes regardless of distribution and versions

btrbk support

I saw you added Btrfs support via snapper and timeshift. Is it possible to also add support for btrbk? It produces snapshots according to its configuration file. It has a subcommand btrbk list source that when run shows the source subvolume, snapshot subvolume and the snapshot name.

For example with this config file:

timestamp_format           long
snapshot_preserve_min      24h
snapshot_preserve          36h

volume /mnt/storage0
    snapshot_dir  /mnt/snapshots/data
    subvolume     Documents
    subvolume     Pictures

the command btrbk list source produces this output:

SOURCE_SUBVOLUME         SNAPSHOT_PATH        SNAPSHOT_NAME
/mnt/storage0/Documents  /mnt/snapshots/data  Documents
/mnt/storage0/Pictures   /mnt/snapshots/data  Pictures

And if I list the snapshots with sudo btrbk list snapshots:

SOURCE_SUBVOLUME         SNAPSHOT_SUBVOLUME                           STATUS
/mnt/storage0/Documents  /mnt/snapshots/data/Documents.20220605T2100  -
/mnt/storage0/Documents  /mnt/snapshots/data/Documents.20220606T1054  -
/mnt/storage0/Documents  /mnt/snapshots/data/Documents.20220606T1100  -
/mnt/storage0/Documents  /mnt/snapshots/data/Documents.20220606T1200  -
/mnt/storage0/Documents  /mnt/snapshots/data/Documents.20220606T1300  -
/mnt/storage0/Documents  /mnt/snapshots/data/Documents.20220606T1400  -
/mnt/storage0/Documents  /mnt/snapshots/data/Documents.20220606T1500  -
/mnt/storage0/Documents  /mnt/snapshots/data/Documents.20220606T1600  -
/mnt/storage0/Documents  /mnt/snapshots/data/Documents.20220607T0938  up-to-date
/mnt/storage0/Pictures   /mnt/snapshots/data/Pictures.20220605T2100   -
/mnt/storage0/Pictures   /mnt/snapshots/data/Pictures.20220606T1054   -
/mnt/storage0/Pictures   /mnt/snapshots/data/Pictures.20220606T1100   -
/mnt/storage0/Pictures   /mnt/snapshots/data/Pictures.20220606T1200   -
/mnt/storage0/Pictures   /mnt/snapshots/data/Pictures.20220606T1300   -
/mnt/storage0/Pictures   /mnt/snapshots/data/Pictures.20220606T1400   -
/mnt/storage0/Pictures   /mnt/snapshots/data/Pictures.20220606T1500   -
/mnt/storage0/Pictures   /mnt/snapshots/data/Pictures.20220606T1600   -
/mnt/storage0/Pictures   /mnt/snapshots/data/Pictures.20220607T0938   up-to-date

Snapshots not detected with btrfs

Problem:
Existing snapshots are not being detected when commands like doas httm -i ~/ are used when snapshots are under /mnt/rpool/snapshots/home, where /mnt/rpool is the root.

Steps to reproduce:

  1. Have the root mounted under a directory, such as /mnt/rpool with something like this in /etc/fstab (may have to restart computer instead of just using doas mount -a after adding to /etc/fstab)
UUID=...	/mnt/rpool	btrfs     	...,subvolid=5,subvol=/	0 0
  1. Create a directory to hold the snapshots, i.e. doas mkdir -p /mnt/rpool/snapshots/home
  2. Create a snapshot of the home subvolume (assuming /home is a subvolume), doas btrfs subvolume snapshot -r /home /mnt/rpool/snapshots/home/@home.test
  3. Run doas httm -i ~/

Expected results:
Snapshot under /mnt/rpool/snapshots/home/@home.test appears as an option.

Actual results:
Snapshot doesn't appear as an option.

Additional information:
The (trimmed down) results of doas btrfs subvolume list -s / are:

ID 3005 gen 594605 cgen 198847 top level 5 otime 2021-10-31 12:19:14 path @
ID 7309 gen 591271 cgen 466749 top level 5 otime 2022-04-03 05:50:56 path snapshots/home/@home.20220403T0550
ID 8040 gen 591271 cgen 521624 top level 5 otime 2022-05-01 00:00:01 path snapshots/home/@home.20220501T0000
ID 8041 gen 591271 cgen 521690 top level 5 otime 2022-05-01 00:32:41 path snapshots/root/@.20220501T0032
ID 8208 gen 594637 cgen 535944 top level 259 otime 2022-05-08 19:54:17 path @home/kody/.local/share/Steam
...
ID 9017 gen 592987 cgen 592986 top level 5 otime 2022-06-07 21:40:26 path snapshots/root/@.20220607T2140
ID 9018 gen 592988 cgen 592987 top level 5 otime 2022-06-07 21:40:26 path snapshots/root/@.20220607T2140_1
...
ID 9038 gen 594602 cgen 594602 top level 5 otime 2022-06-08 20:00:01 path snapshots/home/@home.20220608T2000

Doesn't build on musl - libc::malloc_trim is GNU-specific

Describe the bug
When building httm with musl libc, for example on Alpine Linux, the build fails with the following:

error[E0425]: cannot find function `malloc_trim` in crate `libc`                             
   --> src/exec/interactive.rs:104:27
    |
104 |             let _ = libc::malloc_trim(0);
    |                           ^^^^^^^^^^^ not found in `libc`

error[E0425]: cannot find function `malloc_trim` in crate `libc`
   --> src/exec/interactive.rs:172:35
    |
172 |                     let _ = libc::malloc_trim(0);
    |                                   ^^^^^^^^^^^ not found in `libc`

To Reproduce

$ docker run --rm -it alpine:edge sh -c 'apk add cargo && cargo install [email protected]'

Expected behavior
A additional target_env = "gnu" guard before libc::malloc_trim, both in httm itself and in the two_percent crate.

Additional context

  • httm version: 0.27.0
  • OS: Alpine Linux edge
  • Relevant filesystem/s: n/a

I'm trying to build and run on Buster and getting the following

    Did you ever get this sorted?  I'm trying to build and run on Buster and getting the following:
 Compiling httm v0.18.2 (/usr/local/cargo/git/checkouts/httm-06074a082ad4c88e/0375596)
error[E0308]: mismatched types
   --> src/library/utility.rs:68:33
    |
68  |         ret = libc::setpriority(priority_type as u32, tid, priority_level)
    |               ----------------- ^^^^^^^^^^^^^^^^^^^^ expected `i32`, found `u32`
    |               |
    |               arguments to this function are incorrect
    |
note: function defined here
   --> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.138/src/unix/linux_like/linux/musl/mod.rs:733:12
    |
733 |     pub fn setpriority(which: ::c_int, who: ::id_t, prio: ::c_int) -> ::c_int;
    |            ^^^^^^^^^^^
help: you can convert a `u32` to an `i32` and panic if the converted value doesn't fit
    |
68  |         ret = libc::setpriority((priority_type as u32).try_into().unwrap(), tid, priority_level)
    |                                 +                    +++++++++++++++++++++

For more information about this error, try `rustc --explain E0308`.
error: could not compile `httm` due to previous error
error: failed to compile `httm v0.18.2 (https://github.com/kimono-koans/httm.git?tag=0.18.2#03755960)`, intermediate artifacts can be found at `/tmp/cargo-installKsWLW7`
The command '/bin/sh -c cargo install --git https://github.com/kimono-koans/httm.git --tag "0.18.2" --target x86_64-unknown-linux-musl' returned a non-zero code: 101

Originally posted by @PrplHaz4 in #17 (comment)

affected by CVE-2020-26235 via transitive dependencies

Running cargo audit on the repo shows a security vulnerability, via skim -> timer -> chrono -> time.

$ cargo audit
    Fetching advisory database from `https://github.com/RustSec/advisory-db.git`
      Loaded 469 security advisories (from /home/timeshifter/.cargo/advisory-db)
    Updating crates.io index
    Scanning Cargo.lock for vulnerabilities (135 crate dependencies)
Crate:     time
Version:   0.1.44
Title:     Potential segfault in the time crate
Date:      2020-11-18
ID:        RUSTSEC-2020-0071
URL:       https://rustsec.org/advisories/RUSTSEC-2020-0071
Solution:  Upgrade to >=0.2.23
Dependency tree:
time 0.1.44
└── chrono 0.4.22
    ├── timer 0.2.0
    │   └── skim 0.10.1
    │       └── httm 0.17.0
    └── skim 0.10.1

Crate:     ansi_term
Version:   0.12.1
Warning:   unmaintained
Title:     ansi_term is Unmaintained
Date:      2021-08-18
ID:        RUSTSEC-2021-0139
URL:       https://rustsec.org/advisories/RUSTSEC-2021-0139
Dependency tree:
ansi_term 0.12.1
└── lscolors 0.12.0
    └── httm 0.17.0

error: 1 vulnerability found!
warning: 1 allowed warning found

Error: httm could not find any valid ZFS datasets on the system. (FreeBSD)

Hi there, I just set up a clean bare metal machine with ZFS to try HTTM. Here was my install process:

zfs snapshot -r bootdev5@orig
pkg install git rust
export PATH=$PATH:/root/.cargo/bin
git clone https://github.com/kimono-koans/httm.git
cargo install --path ./httm/
[no errors]
zfs snapshot -r bootdev5@after-httm

And then I go:
httm -I -R ~/
And it goes:
Error: httm could not find any valid ZFS datasets on the system.

Did I miss a step?

How to restore a file from a ZFS snapshot interactively using httm browser?

The httm README doesn't tell me how to do what I'd like to do with httm. I'm not sure it can do what I want yet so maybe you could explain to me how to do the following with httm and then, if it is possible, we could add these instructions to the httm README?

The scenario is this. My user has a ZFS dataset home dir and I have multiple files with several snapshots for files in the home dir. I would like to use httm browser mode to select one of these files and then either revert the file in place to a chosen previous snapshot or be able to easily restore a previous version of a file into another directory, all from within the httm TUI browser.

Can either of these be done? If so, how? I've worked out the first step which would be running:

httm -b ~

Then it seems all I can get httm to do is print out snapshot details for files to the console.

Does httm support interactive file snapshot restoration in the way I describe?

Using with btrbk: Error: No snaps found for mount: "/var/lib/docker/btrfs"

I use btrbk for creating hourly snapshots of my btrfs filesystem.

httm doesn't seem able to find any snapshots:

% sudo httm --list-snaps
Error: No snaps found for mount: "/var/lib/docker/btrfs"
%
% ls /mnt/btrfs-vol/home/btrbk/home | head -n3
home.20240218T1346/  home.20240228T1400/  home.20240302T2302/
home.20240219T0901/  home.20240228T1500/  home.20240303T0000/
home.20240220T1650/  home.20240228T1600/  home.20240303T1425/

I read the man page, but couldn't find a way to specify where to look for my snapshots.


Additional context
Add any other context about the problem here. Perhaps you should include system details like:

  • httm 0.37.0
  • OS: Manjaro using httm-bin package
  • Relevant filesystem/s: btrfs
  • httm --debug output if applicable:
    % sudo httm --debug
    Error: No snaps found for mount: "/var/lib/docker/btrfs"

Search for deleted files does not work

I ran httm -i on a ZFS dataset and searched for a deleted file. It could not find it. I also tried select mode with httm -s and it doesn't show the file. Findoid finds it in the snapshot. I installed using cargo and am running version 0.5.2

--preview does not work

Describe the bug
I am not getting any previews.
My symptoms are very similar to #57, so maybe I should have re-opened that one, but because it is quite old I decided not to.
Feel free to correct me on that.

When I run httm --preview -s, I get:
image
When I select test.txt, I get:
image

I'm running 0.30.4, from NixOS/nixpkgs#267886.

As discussed in #88, the scripts are in my $PATH.
I have tried in fish and bash, both as root and as user.

I tried to run execsnoop-bpfcc -x -q, but that binary doesn't exist in the package you linked to in the other issue.

la /nix/store/wijbi86ajq7kqs3vf3901ch9wydjyhhb-bpftrace-0.19.1/bin/
Permissions Links Size User Group Date Modified    Name                  Permissions Links Size User Group Date Modified    Name              Permissions Links Size User Group Date Modified    Name
lrwxrwxrwx      2    - root root  1970-01-01 01:00 bashreadline.bt@      lrwxrwxrwx      2    - root root  1970-01-01 01:00 loads.bt@         lrwxrwxrwx      2    - root root  1970-01-01 01:00 syscount.bt@
lrwxrwxrwx      2    - root root  1970-01-01 01:00 biolatency-kp.bt@     lrwxrwxrwx      2    - root root  1970-01-01 01:00 mdflush.bt@       lrwxrwxrwx      2    - root root  1970-01-01 01:00 tcpaccept.bt@
lrwxrwxrwx      2    - root root  1970-01-01 01:00 biolatency.bt@        lrwxrwxrwx      2    - root root  1970-01-01 01:00 naptime.bt@       lrwxrwxrwx      2    - root root  1970-01-01 01:00 tcpconnect.bt@
lrwxrwxrwx      2    - root root  1970-01-01 01:00 biosnoop.bt@          lrwxrwxrwx      2    - root root  1970-01-01 01:00 oomkill.bt@       lrwxrwxrwx      2    - root root  1970-01-01 01:00 tcpdrop.bt@
lrwxrwxrwx      2    - root root  1970-01-01 01:00 biostacks.bt@         lrwxrwxrwx      2    - root root  1970-01-01 01:00 opensnoop.bt@     lrwxrwxrwx      2    - root root  1970-01-01 01:00 tcplife.bt@
lrwxrwxrwx      2    - root root  1970-01-01 01:00 bitesize.bt@          lrwxrwxrwx      2    - root root  1970-01-01 01:00 pidpersec.bt@     lrwxrwxrwx      2    - root root  1970-01-01 01:00 tcpretrans.bt@
.r-xr-xr-x      2 3.0M root root  1970-01-01 01:00 bpftrace*             lrwxrwxrwx      2    - root root  1970-01-01 01:00 runqlat.bt@       lrwxrwxrwx      2    - root root  1970-01-01 01:00 tcpsynbl.bt@
.r-xr-xr-x      2 1.6M root root  1970-01-01 01:00 bpftrace-aotrt*       lrwxrwxrwx      2    - root root  1970-01-01 01:00 runqlen.bt@       lrwxrwxrwx      2    - root root  1970-01-01 01:00 threadsnoop.bt@
lrwxrwxrwx      2    - root root  1970-01-01 01:00 capable.bt@           lrwxrwxrwx      2    - root root  1970-01-01 01:00 setuids.bt@       lrwxrwxrwx      2    - root root  1970-01-01 01:00 undump.bt@
lrwxrwxrwx      2    - root root  1970-01-01 01:00 cpuwalk.bt@           lrwxrwxrwx      2    - root root  1970-01-01 01:00 ssllatency.bt@    lrwxrwxrwx      2    - root root  1970-01-01 01:00 vfscount.bt@
lrwxrwxrwx      2    - root root  1970-01-01 01:00 dcsnoop.bt@           lrwxrwxrwx      2    - root root  1970-01-01 01:00 sslsnoop.bt@      lrwxrwxrwx      2    - root root  1970-01-01 01:00 vfsstat.bt@
lrwxrwxrwx      2    - root root  1970-01-01 01:00 execsnoop.bt@         lrwxrwxrwx      2    - root root  1970-01-01 01:00 statsnoop.bt@     lrwxrwxrwx      2    - root root  1970-01-01 01:00 writeback.bt@
lrwxrwxrwx      2    - root root  1970-01-01 01:00 gethostlatency.bt@    lrwxrwxrwx      2    - root root  1970-01-01 01:00 swapin.bt@        lrwxrwxrwx      2    - root root  1970-01-01 01:00 xfsdist.bt@

So I tried execsnoop.bt -x -q:

/nix/store/wijbi86ajq7kqs3vf3901ch9wydjyhhb-bpftrace-0.19.1/bin/bpftrace: invalid option -- 'x'
USAGE:
    bpftrace [options] filename
    bpftrace [options] - <stdin input>
    bpftrace [options] -e 'program'

OPTIONS:
    -B MODE        output buffering mode ('full', 'none')
    -f FORMAT      output format ('text', 'json')
    -o file        redirect bpftrace output to file
    -e 'program'   execute this program
    -h, --help     show this help message
    -I DIR         add the directory to the include search path
    --include FILE add an #include file before preprocessing
    -l [search]    list probes
    -p PID         enable USDT probes on PID
    -c 'CMD'       run CMD and enable USDT probes on resulting process
    --usdt-file-activation
                   activate usdt semaphores based on file path
    --unsafe       allow unsafe builtin functions
    -q             keep messages quiet
    --info         Print information about kernel BPF support
    -k             emit a warning when a bpf helper returns an error (except read functions)
    -kk            check all bpf helper functions
    -V, --version  bpftrace version
    --no-warnings  disable all warning messages

TROUBLESHOOTING OPTIONS:
    -v                      verbose messages
    -vv                     more verbose messages (max 2)
    -d                      (dry run) debug info
    -dd                     (dry run) verbose debug info
    --emit-elf FILE         (dry run) generate ELF file with bpf programs and write to FILE
    --emit-llvm FILE        write LLVM IR to FILE.original.ll and FILE.optimized.ll

ENVIRONMENT:
    BPFTRACE_STRLEN             [default: 64] bytes on BPF stack per str()
    BPFTRACE_NO_CPP_DEMANGLE    [default: 0] disable C++ symbol demangling
    BPFTRACE_MAP_KEYS_MAX       [default: 4096] max keys in a map
    BPFTRACE_CAT_BYTES_MAX      [default: 10k] maximum bytes read by cat builtin
    BPFTRACE_MAX_PROBES         [default: 512] max number of probes
    BPFTRACE_MAX_BPF_PROGS      [default: 512] max number of generated BPF programs
    BPFTRACE_LOG_SIZE           [default: 1000000] log size in bytes
    BPFTRACE_PERF_RB_PAGES      [default: 64] pages per CPU to allocate for ring buffer
    BPFTRACE_NO_USER_SYMBOLS    [default: 0] disable user symbol resolution
    BPFTRACE_CACHE_USER_SYMBOLS [default: auto] enable user symbol cache
    BPFTRACE_VMLINUX            [default: none] vmlinux path used for kernel symbol resolution
    BPFTRACE_BTF                [default: none] BTF file
    BPFTRACE_STR_TRUNC_TRAILER  [default: '..'] string truncation trailer
    BPFTRACE_STACK_MODE         [default: bpftrace] Output format for ustack and kstack builtins

EXAMPLES:
bpftrace -l '*sleep*'
    list probes containing "sleep"
bpftrace -e 'kprobe:do_nanosleep { printf("PID %d sleeping...\n", pid); }'
    trace processes calling sleep
bpftrace -e 'tracepoint:raw_syscalls:sys_enter { @[comm] = count(); }'
    count syscalls by process name

When I run execsnoop.bt -q I get a seemingly unending stream of output:

TIME(ms)   PID   ARGS
689        625441 /run/current-system/sw/bin/fish -c  sudo /root/.local/bin/get_fan_rpm.sh
698        625443 /nix/store/9c5qm297qnvwcf7j0gm01qrslbiqz8rs-gnused-4.9/bin/sed s/[ \t]//g
700        625444 /nix/store/q1c2flcykgr4wwg5a6h450hxbk4ch589-bash-5.2-p15/bin/bash -c env
702        625444 env
703        625445 /nix/store/q1c2flcykgr4wwg5a6h450hxbk4ch589-bash-5.2-p15/bin/bash -c source /etc/fish/foreign-env/shellInit && echo && echo '---DIVIDER---' && env
705        625445 env
714        625446 sudo /root/.local/bin/get_fan_rpm.sh
714        625446 sudo /root/.local/bin/get_fan_rpm.sh
724        625447 /root/.local/bin/get_fan_rpm.sh
724        625447 bash /root/.local/bin/get_fan_rpm.sh
724        625447 bash /root/.local/bin/get_fan_rpm.sh
724        625447 bash /root/.local/bin/get_fan_rpm.sh
724        625447 bash /root/.local/bin/get_fan_rpm.sh
725        625447 bash /root/.local/bin/get_fan_rpm.sh
725        625447 bash /root/.local/bin/get_fan_rpm.sh
725        625447 bash /root/.local/bin/get_fan_rpm.sh
725        625447 bash /root/.local/bin/get_fan_rpm.sh
725        625447 bash /root/.local/bin/get_fan_rpm.sh
725        625447 bash /root/.local/bin/get_fan_rpm.sh
727        625448 ectool pwmgetfanrpm 0
727        625449 grep -Eo [[:digit:]]+
727        625450 sed -n 2p
1689       625452 /run/current-system/sw/bin/fish -c  sudo /root/.local/bin/get_fan_rpm.sh
1698       625454 /nix/store/9c5qm297qnvwcf7j0gm01qrslbiqz8rs-gnused-4.9/bin/sed s/[ \t]//g
1700       625455 /nix/store/q1c2flcykgr4wwg5a6h450hxbk4ch589-bash-5.2-p15/bin/bash -c env
1702       625455 env

Additional context

  • httm version
    httm 0.30.4
  • OS: [e.g. Ubuntu 22.04]
    NixOS unstable
  • Relevant filesystem/s: [e.g. ZFS or btrfs]
    ZFS
  • httm --debug output if applicable
Config {
    paths: [
        PathData {
            path_buf: "/home/bart",
            metadata: Some(
                PathMetadata {
                    size: 164,
                    modify_time: SystemTime {
                        tv_sec: 1700490046,
                        tv_nsec: 228642104,
                    },
                },
            ),
        },
    ],
    opt_recursive: false,
    opt_exact: false,
    opt_no_filter: false,
    opt_debug: true,
    opt_no_traverse: false,
    opt_omit_ditto: false,
    opt_no_hidden: false,
    opt_json: false,
    opt_one_filesystem: false,
    uniqueness: UniqueMetadata,
    opt_bulk_exclusion: None,
    opt_last_snap: None,
    opt_preview: Some(
        "default",
    ),
    opt_deleted_mode: None,
    opt_requested_dir: Some(
        "/home/bart",
    ),
    requested_utc_offset: +01:00:00,
    exec_mode: Interactive(
        Select,
    ),
    print_mode: FormattedDefault,
    dataset_collection: FilesystemInfo {
        map_of_datasets: MapOfDatasets {
            inner: {
                "/var/log": DatasetMetadata {
                    source: "rpool/nixos/var/log",
                    fs_type: Zfs,
                    mount_type: Local,
                },
                "/nix/store": DatasetMetadata {
                    source: "rpool/nixos/root",
                    fs_type: Zfs,
                    mount_type: Local,
                },
                "/boot": DatasetMetadata {
                    source: "bpool/nixos/root",
                    fs_type: Zfs,
                    mount_type: Local,
                },
                "/home": DatasetMetadata {
                    source: "rpool/nixos/home",
                    fs_type: Zfs,
                    mount_type: Local,
                },
                "/var/lib": DatasetMetadata {
                    source: "rpool/nixos/var/lib",
                    fs_type: Zfs,
                    mount_type: Local,
                },
                "/": DatasetMetadata {
                    source: "rpool/nixos/root",
                    fs_type: Zfs,
                    mount_type: Local,
                },
            },
            max_len: 3,
        },
        map_of_snaps: MapOfSnaps {
            inner: {
                "/": [],
                "/boot": [],
                "/var/log": [],
                "/home": [
                    "/home/.zfs/snapshot/zfs-auto-snap_frequent-2023-11-20-15h15",
                    "/home/.zfs/snapshot/zfs-auto-snap_hourly-2023-11-20-13h00U",
                    "/home/.zfs/snapshot/zfs-auto-snap_frequent-2023-11-20-15h30",
                    "/home/.zfs/snapshot/zfs-auto-snap_frequent-2023-11-20-14h30",
                    "/home/.zfs/snapshot/zfs-auto-snap_frequent-2023-11-20-14h45",
                    "/home/.zfs/snapshot/zfs-auto-snap_hourly-2023-11-20-15h00",
                ],
                "/var/lib": [],
            },
        },
        filter_dirs: FilterDirs {
            inner: {
                "/dev/mqueue",
                "/run",
                "/sys/fs/bpf",
                "/dev/pts",
                "/sys/fs/pstore",
                "/sys/firmware/efi/efivars",
                "/sys/kernel/config",
                "/sys",
                "/run/user/1001",
                "/dev/hugepages",
                "/run/user/1001/doc",
                "/boot/efis/nvme-WD_BLACK_SN850X_1000GB_223761800744-part1",
                "/sys/kernel/debug/tracing",
                "/sys/kernel/debug",
                "/run/keys",
                "/proc",
                "/sys/fs/cgroup",
                "/dev/shm",
                "/dev",
                "/boot/efi",
                "/run/wrappers",
                "/sys/kernel/security",
                "/sys/fs/fuse/connections",
            },
            max_len: 5,
        },
        opt_map_of_alts: None,
        opt_map_of_aliases: None,
        opt_common_snap_dir: None,
    },
    pwd: "/home/bart",
}
httm select/restore/prune session was aborted.  Quitting.

Unable to install provided rpm packages

Hello, I am unable to install any of recent rpm packages on Fedora due to conflicts.
Here's the message dnf gives me:

Error: Transaction test error:
  file /usr/bin from install of httm-0.14.10-2.x86_64 conflicts with file from package filesystem-3.18-2.fc36.x86_64

I noticed that recently package creation process has been changed so that rpms are created using alien. As far as I've researched, the problem with alien is known and the gist of it is that alien can include unnecessary paths to the package spec that conflict with system packages.
One way it can be solved is by rebuilding the package with a fixed spec, like demonstrated here.

Maybe it is possible to add some steps to rpm creation to remove conflicting paths, something like the method in the linked article?

httm fails to run with 'Error: No such file or directory (os error 2)'

The latest version of httm (installed via httm_0.37.0-1_amd64.deb) fails with the error Error: No such file or directory (os error 2), while the previous version 0.36.5 (installed via httm_0.36.5-1_amd64.deb) seems to work. This applies to invoking httm without parameters, or with httm -b for browsing, but httm -h works either way.

# With 0.37.0
cbreak@twilight:~$ httm .bashrc       
Error: No such file or directory (os error 2)

# With 0.36.5
cbreak@twilight:~$ httm .bashrc       
───────────────────────────────────────────────────────────────────────────────────────────────────────────
Sat Jan 02 14:21:02 2021  3.7 KiB  "/home/cbreak/.zfs/snapshot/autosnap_2024-03-11_15:00:20_hourly/.bashrc"
───────────────────────────────────────────────────────────────────────────────────────────────────────────
Sat Jan 02 14:21:02 2021  3.7 KiB  "/home/cbreak/.bashrc"
───────────────────────────────────────────────────────────────────────────────────────────────────────────

I've attached an strace from such a failure. The only interesting part seems to be the following:

openat(AT_FDCWD, "/sys/fs/cgroup/cpu.max", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
sched_getaffinity(0, 128, [0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15]) = 8
rt_sigaction(SIGRT_1, {sa_handler=0x7153f74bc8a0, sa_mask=[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x7153f746a990}, NULL, 8) = 0

I don't know if this is related to the error, since it doesn't seem like a reason to fail, and in fact the working version also performs these operations, with the same outcome, but does NOT fail. Maybe some other part of the code reads the stale errno value.

This is reproducible on my system (Ubuntu 23.10, zfs-2.2.0~rc3-0ubuntu4).

Better name

Why is the program called httm? Is that an acronym? If so, what does it stand for? This isn't currently explained in the README.

httm is totally unmemorable IMO and I'd expect it would be a http tool of some sort like a webserver, if I had to guess from its name. I always prefer it when programs have names that represent what they do so how about changing the program name to something more memorable and descriptive like snapfind or snapsearch? I think it would help with adoption.

Thanks

Can't find btrbk snapshots -- WARN: No snapshot version exists for the specified file.

% sudo httm ~/.zshrc
WARN: No snaps found for mount: "/var/lib/docker/btrfs"
────────────────────────────────────────────────────────
WARN: No snapshot version exists for the specified file.
────────────────────────────────────────────────────────
Sat Jun 22 13:04:26 2019  607 bytes  "/home/ravi/.zshrc"
────────────────────────────────────────────────────────

Expected behavior
I get versions listed

Additional context

My btrbk snaps are stored in:

% ls /mnt/btrfs-vol/home/btrbk/home | head -n3
home.20240306T1431/  home.20240313T1600/  home.20240314T0100/
home.20240307T1133/  home.20240313T1831/  home.20240314T0200/
home.20240308T0000/  home.20240313T1900/  home.20240314T0300/

Note:* I see "/mnt/btrfs-vol/home/btrbk/home", in the (below) debug output, so perhaps there's something about the way that btrbk stores snaps?

It looks ok though:

% sudo btrfs sub list /home | head -n12
ID 258 gen 5314398 top level 678 path btrbk/home
ID 259 gen 5314323 top level 678 path btrbk/home-var
ID 668 gen 5314407 top level 5 path @home@var
ID 677 gen 5314407 top level 5 path @home
ID 678 gen 5314398 top level 5 path btrbk
ID 53132 gen 5308693 top level 258 path btrbk/home/home.20240306T1431
ID 53142 gen 5309019 top level 258 path btrbk/home/home.20240307T1133
ID 53150 gen 5309347 top level 258 path btrbk/home/home.20240308T0000
ID 53174 gen 5310635 top level 258 path btrbk/home/home.20240309T0638
ID 53186 gen 5311199 top level 258 path btrbk/home/home.20240310T1624
ID 53198 gen 5311670 top level 258 path btrbk/home/home.20240311T0000
ID 53210 gen 5312167 top level 258 path btrbk/home/home.20240312T1240

Is there a way of passing a directory to search for snapshots?

Attempts to resolve
I tried symlinking /home/.snapshots to this directory, but that didn't help.

  • httm version httm 0.37.2 (fix btrfs branch)
  • OS: Manjaro
  • Relevant filesystem/s: btrfs, btrbk
  • httm --debug output if applicable:
WARN: No snaps found for mount: "/var/lib/docker/btrfs"
Config {
    paths: [
        PathData {
            path_buf: "/home/ravi/.zshrc",
            metadata: Some(
                PathMetadata {
                    size: 607,
                    modify_time: SystemTime {
                        tv_sec: 1561183466,
                        tv_nsec: 268835952,
                    },
                },
            ),
        },
    ],
    opt_recursive: false,
    opt_exact: false,
    opt_no_filter: false,
    opt_debug: true,
    opt_no_traverse: false,
    opt_omit_ditto: false,
    opt_no_hidden: false,
    opt_json: false,
    opt_one_filesystem: false,
    opt_no_clones: false,
    uniqueness: UniqueMetadata,
    opt_bulk_exclusion: None,
    opt_last_snap: None,
    opt_preview: None,
    opt_deleted_mode: None,
    opt_requested_dir: None,
    requested_utc_offset: +07:00:00,
    exec_mode: BasicDisplay,
    print_mode: FormattedDefault,
    dataset_collection: FilesystemInfo {
        map_of_datasets: MapOfDatasets {
            inner: {
                "/mnt/btrfs-vol/rootfs/btrbk": DatasetMetadata {
                    source: "/btrbk",
                    fs_type: Btrfs,
                    mount_type: Local,
                },
                "/mnt/btrfs-vol/rootfs": DatasetMetadata {
                    source: "/",
                    fs_type: Btrfs,
                    mount_type: Local,
                },
                "/var/lib/docker/btrfs": DatasetMetadata {
                    source: "/@",
                    fs_type: Btrfs,
                    mount_type: Local,
                },
                "/": DatasetMetadata {
                    source: "/@",
                    fs_type: Btrfs,
                    mount_type: Local,
                },
                "/home": DatasetMetadata {
                    source: "/@home",
                    fs_type: Btrfs,
                    mount_type: Local,
                },
                "/home/var": DatasetMetadata {
                    source: "/@home@var",
                    fs_type: Btrfs,
                    mount_type: Local,
                },
                "/mnt/btrfs-vol/home": DatasetMetadata {
                    source: "/",
                    fs_type: Btrfs,
                    mount_type: Local,
                },
                "/mnt/btrfs-vol/home/btrbk": DatasetMetadata {
                    source: "/btrbk",
                    fs_type: Btrfs,
                    mount_type: Local,
                },
            },
        },
        map_of_snaps: MapOfSnaps {
            inner: {
                "/mnt/btrfs-vol/rootfs/btrbk": [],
                "/mnt/btrfs-vol/rootfs": [
                    "/mnt/btrfs-vol/rootfs/btrbk/",
                    "/mnt/btrfs-vol/rootfs/@/var/lib/docker/btrfs/subvolumes/cf2c4e1d10091ce3ab05dce93315e1869595d295f8dea840f97c256ee2da1aca",
                    "/mnt/btrfs-vol/rootfs/@/var/lib/docker/btrfs/subvolumes/6e339ae992d40982514f46c4ced156f6b79b6a7f27bc9c2bd2e5dad97eb4d87f",
                    "/mnt/btrfs-vol/rootfs/@/var/lib/docker/btrfs/subvolumes/f48b65ed509b03c4043221ff010f2693cc0fe0d53e8526d3174c85a60c734526",
                    "/mnt/btrfs-vol/rootfs/@/var/lib/docker/btrfs/subvolumes/f3c55cd445653d1b70d50e9508fdcfa41101ed256824226342c6eb465726f846",
                    "/mnt/btrfs-vol/rootfs/@/var/lib/docker/btrfs/subvolumes/adb40a6c6e25c139164de83d93d7f9e8109de3fdb39dfc6d1dbaa0a50607b0c5",
                    "/mnt/btrfs-vol/rootfs/@/var/lib/docker/btrfs/subvolumes/3f1655ebddf89409796030c9808a59bd78edd91dee4959c28d35f1bb9bc8434f",
                    "/mnt/btrfs-vol/rootfs/@/var/lib/docker/btrfs/subvolumes/eac37e352f997ccf0a857cd97376cf2770a60851a2e6e28b05bd07ac526d7d17",
                    "/mnt/btrfs-vol/rootfs/@/var/lib/docker/btrfs/subvolumes/c8c01f4fbf0e15facbb8a001d96a50b11d25377a11bbb3c2392ba58814f10c39",
                    "/mnt/btrfs-vol/rootfs/@/var/lib/docker/btrfs/subvolumes/d4489db0ab6aa521c872ab6cca0ce19e52ca626e707ab134f837a61794973d68",
                    "/mnt/btrfs-vol/rootfs/@/var/lib/manjaro-tools/buildpkg/stable/x86_64/root",
                ],
                "/var/lib/docker/btrfs": [],
                "/": [
                    "/mnt/btrfs-vol/rootfs/btrbk/rootfs.20240306T1431",
                    "/mnt/btrfs-vol/rootfs/btrbk/rootfs.20240307T1133",
                    "/mnt/btrfs-vol/rootfs/btrbk/rootfs.20240308T0000",
                    "/mnt/btrfs-vol/rootfs/btrbk/rootfs.20240309T0638",
                    "/mnt/btrfs-vol/rootfs/btrbk/rootfs.20240310T1624",
                    "/mnt/btrfs-vol/rootfs/btrbk/rootfs.20240311T0000",
                    "/mnt/btrfs-vol/rootfs/btrbk/rootfs.20240312T1240",
                    "/mnt/btrfs-vol/rootfs/btrbk/rootfs.20240313T1323",
                    "/mnt/btrfs-vol/rootfs/btrbk/rootfs.20240313T1400",
                    "/mnt/btrfs-vol/rootfs/btrbk/rootfs.20240313T1500",
                    "/mnt/btrfs-vol/rootfs/btrbk/rootfs.20240313T1600",
                    "/mnt/btrfs-vol/rootfs/btrbk/rootfs.20240313T1831",
                    "/mnt/btrfs-vol/rootfs/btrbk/rootfs.20240313T1900",
                    "/mnt/btrfs-vol/rootfs/btrbk/rootfs.20240313T1932",
                    "/mnt/btrfs-vol/rootfs/btrbk/rootfs.20240313T2000",
                    "/mnt/btrfs-vol/rootfs/btrbk/rootfs.20240313T2038",
                    "/mnt/btrfs-vol/rootfs/btrbk/rootfs.20240313T2100",
                    "/mnt/btrfs-vol/rootfs/btrbk/rootfs.20240313T2200",
                    "/mnt/btrfs-vol/rootfs/btrbk/rootfs.20240313T2300",
                    "/mnt/btrfs-vol/rootfs/btrbk/rootfs.20240314T0000",
                    "/mnt/btrfs-vol/rootfs/btrbk/rootfs.20240314T0100",
                    "/mnt/btrfs-vol/rootfs/btrbk/rootfs.20240314T0200",
                    "/mnt/btrfs-vol/rootfs/btrbk/rootfs.20240314T0300",
                    "/mnt/btrfs-vol/rootfs/btrbk/rootfs.20240314T0400",
                    "/mnt/btrfs-vol/rootfs/btrbk/rootfs.20240314T0949",
                    "/mnt/btrfs-vol/rootfs/btrbk/rootfs.20240314T1000",
                    "/mnt/btrfs-vol/rootfs/btrbk/rootfs.20240314T1414",
                    "/mnt/btrfs-vol/rootfs/btrbk/rootfs.20240314T1500",
                    "/mnt/btrfs-vol/rootfs/btrbk/rootfs.20240315T1204",
                ],
                "/home": [],
                "/home/var": [],
                "/mnt/btrfs-vol/home": [
                    "/mnt/btrfs-vol/rootfs/btrbk/",
                    "/mnt/btrfs-vol/home/btrbk/home",
                    "/mnt/btrfs-vol/home/btrbk/home-var",
                ],
                "/mnt/btrfs-vol/home/btrbk": [],
            },
        },
        filter_dirs: FilterDirs {
            inner: {
                "/boot",
                "/var/lib/snapd/snap/gtk-common-themes/1535",
                "/var/lib/snapd/snap/snapd/21184",
                "/media/space",
                "/dev/mqueue",
                "/media/1TB-toshiba",
                "/sys/kernel/debug",
                "/sys/firmware/efi/efivars",
                "/var/lib/snapd/snap/gnome-3-28-1804/161",
                "/media/ssd",
                "/var/lib/snapd/snap/core18/2796",
                "/ssh/ravidroid",
                "/tmp",
                "/var/lib/snapd/snap/copay/48",
                "/proc/sys/fs/binfmt_misc",
                "/proc",
                "/dev",
                "/var/lib/snapd/snap/gtk-common-themes/1534",
                "/var/lib/snapd/snap/todoist/1291",
                "/run/user/1000",
                "/dev/shm",
                "/ssh/jnanidroid",
                "/var/lib/snapd/snap/snapd/20671",
                "/var/lib/snapd/snap/core18/2812",
                "/sys/fs/cgroup",
                "/sys/fs/pstore",
                "/dev/hugepages",
                "/sys/kernel/security",
                "/var/lib/snapd/snap/todoist/1289",
                "/media/128GB-samsung",
                "/sys/fs/cgroup/net_cls",
                "/sys/kernel/tracing",
                "/ssh/jnanitab",
                "/var/lib/snapd/snap/copay/49",
                "/run",
                "/tmp/.mount_espans7nJr4s",
                "/media/32GB-sandisk",
                "/var/lib/snapd/snap/gnome-3-28-1804/198",
                "/mnt/esp",
                "/run/user/1000/gvfs",
                "/dev/pts",
                "/sys/fs/bpf",
                "/sys/fs/fuse/connections",
                "/sys/kernel/config",
                "/run/user/1000/doc",
                "/sys",
                "/var/lib/snapd/snap/bare/5",
            },
        },
        opt_map_of_alts: None,
        opt_map_of_aliases: None,
        opt_common_snap_dir: Some(
            "/mnt/btrfs-vol",
        ),
    },
    pwd: "/mnt/btrfs-vol/home",
}
────────────────────────────────────────────────────────
WARN: No snapshot version exists for the specified file.
────────────────────────────────────────────────────────
Sat Jun 22 13:04:26 2019  607 bytes  "�[1m/home/ravi/.zshrc�[0m"
────────────────────────────────────────────────────────

Can't see multiple versions of files in interactive mode (BTRFS)

I have BTRFS snapshots automatically generated by btrbk. I can manually go through the snapshots without a problem. The snapshots are stored in a subvolume called .snapshots under /data.

When I try to look at a sample directory (using httm -b -R) where I should have snapshots of older versions of the files I'm working on, I don't see those older versions at all. Clicking enter to select drops me out of the interactive mode and reprints the file name. Here are some screenshots to show you what I mean.

For example, arch_r.sh is a file I should have several versions of, but I only see the latest version.

image

Clicking enter drops me back to the Terminal.

image

Here's the file in two different snapshots to show you that I indeed have at least 2 versions of the file in snapshots.

image

Possible to support btrbk with snapshot names without '/snapshot/' suffix?

Is your feature request related to a problem? Please describe.
On my NixOS system, snapshot directories have the following naming scheme (with a 'typical' configuration, i.e. just specifying the target folder for snapshots, no other extra option set):

@/@nixos/@home/.snapshots/user.20230101T2359/, as opposed to @/@nixos/@home/.snapshots/user.20230101T2359/snapshot/, which httm seems to require.

Describe the solution you'd like
Is there any way to configure httm to use this folder layout? If not, would it be possible to support this?

Describe alternatives you've considered
I could probably change my system config to follow your convention, but it would be great to support the convention used by NixOS out of the box.

Thanks!

internal version was not bumped with `0.34.1` release

Hi 👋, Homebrew maintainer here. We are seeing a regression test failure when trying to build the latest (0.34.1) version of httm.
It looks like the internal version was not bumped for the release.

Error: httm: failed
An exception occurred within a child process:
Minitest::Assertion: Expected: "httm 0.34.1"
Actual: "httm 0.34.0"

Homebrew/homebrew-core#159842

Proposal: A btrfs port of httm

Reposted from r/btrfs:

...

When last I asked, I, perhaps too hastily, decided a port wasn't for me, because httm couldn't be made to easily work for all auto-snapshot programs (because the snapshot subvolumes/directories were never in the same place).

Now, I think searching for the most common subvolume mount points (.snapshot for Snapper, etc.) and/or letting the user set another directory via an environment variable (e.g., BTRFS_RELATIVE_SNAPSHOT_DIR) would be enough to cover most use btrfs use cases.

I'd like to ask:

  1. Is this a sane approach?
  2. Should (when do) I ever need to care about "@" subvolumes? That is -- if my PWD is /var/log, and I have a snapshot subvolume for /var/log, the location of .snapshots will generally always be at /var/log/.snapshots/?
  3. What are the most common snapshot-ing schemes used by btrfs users besides snapper (.snapshots) and timeshift (timeshift-btrfs/snapshots)?
  4. Is there anyone here, who keeps lots of snapshots (100s-1000s), who would be willing to test the software on their system?
  5. Could some snapper/timeshift users post their detailed mount and btrfs-subvolume(8) information so that I'm sure what I'm doing comports with how btrfs is used in practice? Perhaps to a Github issue I open? I'd particularly be interested in anyone who backs up (send/receive) their root volumes locally to another volume/pool.
  6. When you wish to view your snapshots read-only, are subvolumes automounted as needed or must you use some other process to mount?

After run of httm all snapshots remain mounted

Before you begin

  1. Have you tried with the latest version of httm? YES
  2. Have you read the README and/or the help (httm -h or man httm)? YES

Describe the bug
After running httm like httm -r file.txt and either hitting ESC or selecting a version to restore, all zfs snapshots from the current dataset remain mounted for around 10 minutes.

This is a root-on-zfs Ubuntu 22.04 system, with ZFS 2.1.6 from the jonathon (RIP :( ) PPA repo

❯ uname -r
6.2.0-35-generic

❯ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.3 LTS
Release:        22.04
Codename:       jammy

❯ zfs --version
zfs-2.1.6-0york1~22.04
zfs-kmod-2.1.9-2ubuntu1.1

Originally noticed with v0.26.x, so upgraded to 0.33.0 and same issue. On another system (Ubuntu 18.04 with httm v0.14.10) the issue does not happen. Oddly, on this 22.04 system v0.14.10 does exhibit the same issue. So it seems to be tied somehow to the Ubuntu 22.04 / ZFS 2.1.6 interaction ?

Snapshots appear as

❯ mount | fgrep zrepl | tail -2
ryzen22/home/alice@zrepl_2023-12-09_21:40:07 on /home/alice/.zfs/snapshot/zrepl_2023-12-09_21:40:07 type zfs (ro,relatime,xattr,posixacl)
ryzen22/home/alice@zrepl_2023-12-20_20:48:43 on /home/alice/.zfs/snapshot/zrepl_2023-12-20_20:48:43 type zfs (ro,relatime,xattr,posixacl)

After some period of time, the snapshots are unmounted. Maybe 10 minutes ? No indications of any errors in dmesg etc.

There are about 90 snapshots on the dataset

❯ zfs list -t all -H -o name -r ryzen22/alice/deano | wc -l
     90

Doesn't detect btrfs snapshots

Describe the bug
httm doesn't detect snapshots for me (just local access)

There is no "single" way to manage snapshots. So I think my layout is somehow special.

I'm using "flat" layout (where root subvol with subvolid=5 is not mounted). I've just a few 'subvolumes' in subvolid=5 with names like rootfs, home, etc.

To start using snapshots I've created additional snapshots subvolume and mounted it to /.snapshots.

% ls -1 /.snapshots 
containers.20240307T1351
containers.20240307T1400
home.20240307T1351
home.20240307T1400
rootfs.20240307T1351
rootfs.20240307T1400
work.20240307T1351
work.20240307T1400

Just migrated from snapper because of I don't like it's .snapshots layout inside volume

Snapshots are managed by btrbk.

 sudo btrfs subvolume list -a -s ~       
ID 262 gen 663 cgen 662 top level 261 otime 2024-03-07 13:51:03 path <FS_TREE>/snapshots/rootfs.20240307T1351
ID 263 gen 664 cgen 663 top level 261 otime 2024-03-07 13:51:03 path <FS_TREE>/snapshots/home.20240307T1351
ID 264 gen 664 cgen 664 top level 261 otime 2024-03-07 13:51:03 path <FS_TREE>/snapshots/work.20240307T1351
ID 265 gen 665 cgen 665 top level 261 otime 2024-03-07 13:51:03 path <FS_TREE>/snapshots/containers.20240307T1351
ID 266 gen 684 cgen 683 top level 261 otime 2024-03-07 14:00:09 path <FS_TREE>/snapshots/rootfs.20240307T1400
ID 267 gen 685 cgen 684 top level 261 otime 2024-03-07 14:00:09 path <FS_TREE>/snapshots/home.20240307T1400
ID 268 gen 685 cgen 685 top level 261 otime 2024-03-07 14:00:09 path <FS_TREE>/snapshots/work.20240307T1400
ID 269 gen 686 cgen 686 top level 261 otime 2024-03-07 14:00:09 path <FS_TREE>/snapshots/containers.20240307T1400

I think that FS_TREE may confuse httm. Plus it's not enough to just strip it because 'FS_TREE/snapshots/' here means snapshots subvolume, not mount point.

I think follwed line from mount describes it:

/dev/mapper/elitepad4-rootfs on /.snapshots type btrfs (rw,noatime,compress=zstd:3,ssd,discard=async,space_cache=v2,subvolid=261,subvol=/snapshots)

I think it's similar to #85

To Reproduce
Steps to reproduce the behavior:

  1. httm --unique=all --debug ~/.zshrc

Expected behavior
Ideally it should automatically guess where snapshots are. Maybe provide some CLI parameter or env variable if autodetect is too diffficult.

Additional context
Add any other context about the problem here. Perhaps you should include system details like:

  • httm 0.36.5
  • OS: Debian Unstable
  • Relevant filesystem/s: all subvolumes are on single btrfs
  • httm --debug attached
    debug.log

usability: document how to take snapshots manually or on an interval

My system is using zsys to do snapshots, which seem to happen when I install things with apt.

httm should provide some generalized documentation on how to create snapshots either manually or scheduled, so that there are more snapshots to choose from when using httm. Especially given the low disk cost of snapshots in zfs.

httm on mounted restic repository?

restic is a backup program that is fast, efficient and secure.

Is it possible with some trickery to use httm on mounted restic repository? Restore using mount

The structure of mounted restic repository is similar to zfs snaphots directory.

error: invalid value 'httmSnapFileMount' for '--snap[=<SNAPSHOT>]'

Describe the bug

I just installed httm and tried to use httm -S .. I get the output

error: invalid value 'httmSnapFileMount' for '--snap[=<SNAPSHOT>]'
  [possible values: snap-file, snapshot, snap-file-mount]

  tip: a similar value exists: 'snap-file-mount'

For more information, try '--help'.

The help output reads "snapshot a file/s most immediate mount. This argument optionally takes a value for a snapshot suffix. The default suffix is 'httmSnapFileMount'. Note: This is a ZFS only option which requires either superuser or 'zfs allow' privileges. [possible values: snap-file, snapshot, snap-file-mount]" (emphasis added).

Did maybe something go wrong in 7d2020f#diff-23f5b9ce1dd89ac0d57d75979300b16283ac4c44b1e79c06d9f483f095547d53R267 ?

Expected behavior

I expected a snapshot with the suffix "httmSnapFileMount" to be taken.

Additional context

  • httm version: httm 0.39.0
  • Relevant filesystem/s: [e.g. ZFS or btrfs]: zfs-2.1.11-1

Snapshot metadata corruption - check for deleted files

Hi,

So I ran this command:
"httm -d -n -R --no-live ~ > deleted-files.txt"
and it caused high cpu usage, which locked out my server. I couldn't ssh or anything. So I did an unsafe poweroff, and then when I rebooted back up, I saw snapshot metadata corruption. I'm not sure what's going on. I'm nervous about repeating that command, so I don't know if it'll happen again. Just thought I should mention it.

(un)show hidden files

It would be good if the httm file browser had the option to (un)show hidden files and directories.

I would prefer it used the CTRL+h key combo used by most Linux file manager programs to (un)show hidden files.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.