From a9aa9d9eae99e0a4b62e997f6b7a78d0f42f768e Mon Sep 17 00:00:00 2001 From: Eduard Tolosa Date: Mon, 5 Feb 2024 12:02:35 -0500 Subject: [PATCH 01/31] Create rust.yml --- .github/workflows/rust.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/rust.yml diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml new file mode 100644 index 0000000..d54fa2f --- /dev/null +++ b/.github/workflows/rust.yml @@ -0,0 +1,22 @@ +name: Rust + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +env: + CARGO_TERM_COLOR: always + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Build + run: cargo build --verbose + - name: Run tests + run: cargo test --verbose From 4648c12379fd9f0ea4f4c46fc27aa56ff2d17d4c Mon Sep 17 00:00:00 2001 From: Eduard Tolosa Date: Mon, 5 Feb 2024 23:22:10 -0500 Subject: [PATCH 02/31] Update prefered database file location. --- examples/config-templates/config-all.toml | 2 +- examples/config-templates/config-home.toml | 2 +- examples/config-templates/config-root.toml | 2 +- src/args.rs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/config-templates/config-all.toml b/examples/config-templates/config-all.toml index ffa5a50..50f148f 100644 --- a/examples/config-templates/config-all.toml +++ b/examples/config-templates/config-all.toml @@ -6,7 +6,7 @@ dest_dir = "/.rusnapshot" # Directory to be snapshot-ed source_dir = "/" # SQLite database file PATH where snapshots metadata will be stored. Created if not exists -database_file = "/var/lib/rusnapshot/rusnapshot.db" +database_file = "/.rusnapshot/rusnapshot.db" # Prefix for the snapshots, they will be saved in the format prefix-$current_date snapshot_prefix = "root" # Snapshots identifier diff --git a/examples/config-templates/config-home.toml b/examples/config-templates/config-home.toml index 4a55c86..f139f97 100644 --- a/examples/config-templates/config-home.toml +++ b/examples/config-templates/config-home.toml @@ -3,7 +3,7 @@ dest_dir = "/.rusnapshot" # Directory to be snapshot-ed source_dir = "/home" # SQLite database file PATH where snapshots metadata will be stored. Created if not exists -database_file = "/var/lib/rusnapshot/rusnapshot.db" +database_file = "/.rusnapshot/rusnapshot.db" # Prefix for the snapshots, they will be saved in the format prefix-$current_date snapshot_prefix = "home" # Last snapshots to keep. If prefix is specified then only the snapshots with that prefix will be deleted diff --git a/examples/config-templates/config-root.toml b/examples/config-templates/config-root.toml index 5f63768..10e0227 100644 --- a/examples/config-templates/config-root.toml +++ b/examples/config-templates/config-root.toml @@ -3,7 +3,7 @@ dest_dir = "/.rusnapshot" # Directory to be snapshot-ed source_dir = "/" # SQLite database file PATH where snapshots metadata will be stored. Created if not exists -database_file = "/var/lib/rusnapshot/rusnapshot.db" +database_file = "/.rusnapshot/rusnapshot.db" # Prefix for the snapshots, they will be saved in the format prefix-$current_date snapshot_prefix = "root" # Last snapshots to keep. If prefix is specified then only the snapshots with that prefix will be deleted diff --git a/src/args.rs b/src/args.rs index 1e9f371..43ed3dd 100644 --- a/src/args.rs +++ b/src/args.rs @@ -28,7 +28,7 @@ pub struct Args { short = 'd', long = "dfile", env = "RUSNAPSHOT_DB_FILE", - default_value = "/var/lib/rusnapshot/rusnapshot.db" + default_value = "/.rusnapshot/rusnapshot.db" )] pub database_file: String, /// Prefix for the snapshot name. From 14c0f371d29d4aea0e2ac5fa6b85a0e1915c2a3f Mon Sep 17 00:00:00 2001 From: Eduard Tolosa Date: Tue, 6 Feb 2024 22:54:57 -0500 Subject: [PATCH 03/31] Bump version. --- Cargo.lock | 2 +- Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9b4bc7a..0f08a10 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -450,7 +450,7 @@ dependencies = [ [[package]] name = "rusnapshot" -version = "0.4.0" +version = "0.4.1" dependencies = [ "anyhow", "chrono", diff --git a/Cargo.toml b/Cargo.toml index d7166c3..5bb9a86 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rusnapshot" -version = "0.4.0" +version = "0.4.1" authors = ["edu4rdshl"] edition = "2018" description = "Simple and handy btrfs snapshoting tool." From 230b2babbec4b174c042ddea6ea3b3b402c2333f Mon Sep 17 00:00:00 2001 From: Eduard Tolosa Date: Wed, 7 Feb 2024 00:01:10 -0500 Subject: [PATCH 04/31] Add support for using a hostname identifier --- Cargo.lock | 18 ++++++++++++++++++ Cargo.toml | 1 + src/args.rs | 9 +++++++++ src/controller.rs | 2 ++ src/database.rs | 15 ++++++++------- src/main.rs | 10 ++++++---- src/structs.rs | 1 + src/utils.rs | 4 ++++ 8 files changed, 49 insertions(+), 11 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0f08a10..829fa69 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -269,6 +269,17 @@ version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5d3d0e0f38255e7fa3cf31335b3a56f05febd18025f4db5ef7a0cfb4f8da651f" +[[package]] +name = "hostname" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c731c3e10504cc8ed35cfe2f1db4c9274c3d35fa486e3b31df46f068ef3e867" +dependencies = [ + "libc", + "match_cfg", + "winapi", +] + [[package]] name = "iana-time-zone" version = "0.1.60" @@ -363,6 +374,12 @@ version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +[[package]] +name = "match_cfg" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4" + [[package]] name = "md5" version = "0.7.0" @@ -455,6 +472,7 @@ dependencies = [ "anyhow", "chrono", "clap", + "hostname", "md5", "prettytable-rs", "serde", diff --git a/Cargo.toml b/Cargo.toml index 5bb9a86..86acef3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,6 +16,7 @@ chrono = "0.4.33" prettytable-rs = "0.10.0" anyhow = "1.0.79" toml = "0.8.9" +hostname = "0.3.1" [profile.release] diff --git a/src/args.rs b/src/args.rs index 43ed3dd..d15cfba 100644 --- a/src/args.rs +++ b/src/args.rs @@ -62,6 +62,9 @@ pub struct Args { /// Create read-write/rw snapshots. #[clap(short = 'w', long = "rw")] pub read_write: bool, + /// Machine name to be used in the metadata. + #[clap(short, long, default_value = "")] + pub machine: String, } impl Args { @@ -148,6 +151,12 @@ impl Args { .parse() .expect("Failed to parse timeout, make sure it's a number"); } + if let Some(machine) = config.get("machine") { + self.machine = machine + .to_string() + .parse() + .expect("Failed to parse machine"); + } Ok(()) } diff --git a/src/controller.rs b/src/controller.rs index 7a0c5a7..2b3f95c 100644 --- a/src/controller.rs +++ b/src/controller.rs @@ -79,6 +79,7 @@ pub fn manage_listing(database_connection: &Connection) -> Result<()> { "KIND", "SOURCE DIR", "DESTINATION DIR", + "MACHINE", "RO/RW", "DATE" ]); @@ -90,6 +91,7 @@ pub fn manage_listing(database_connection: &Connection) -> Result<()> { data.kind, data.source, data.destination, + data.machine, data.ro_rw, data.date, ]); diff --git a/src/database.rs b/src/database.rs index 7eb7f5f..14d8de9 100644 --- a/src/database.rs +++ b/src/database.rs @@ -8,7 +8,7 @@ use { }; pub fn setup_initial_database(connection: &Connection) -> Result<()> { - connection.execute("CREATE TABLE IF NOT EXISTS snapshots (name TEXT NOT NULL, snap_id TEXT NOT NULL, kind TEXT NOT NULL, source TEXT NOT NULL, destination TEXT NOT NULL, ro_rw TEXT NOT NULL, date TEXT DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY(name, snap_id))")?; + connection.execute("CREATE TABLE IF NOT EXISTS snapshots (name TEXT NOT NULL, snap_id TEXT NOT NULL, kind TEXT NOT NULL, source TEXT NOT NULL, destination TEXT NOT NULL, machine TEXT NOT NULL, ro_rw TEXT NOT NULL, date TEXT DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY(name, snap_id))")?; connection.execute("PRAGMA journal_mode=WAL")?; Ok(()) @@ -16,8 +16,8 @@ pub fn setup_initial_database(connection: &Connection) -> Result<()> { pub fn commit_to_database(args: &Args, extra_args: &ExtraArgs) -> Result<()> { let statement = format!( - "INSERT INTO snapshots (name, snap_id, kind, source, destination, ro_rw) VALUES ('{}', '{}', '{}', '{}', '{}', '{}')", - &extra_args.snapshot_name, args.snapshot_id, args.snapshot_kind, args.source_dir, args.dest_dir, args.read_write + "INSERT INTO snapshots (name, snap_id, kind, source, destination, machine, ro_rw) VALUES ('{}', '{}', '{}', '{}', '{}', '{}', '{}')", + &extra_args.snapshot_name, args.snapshot_id, args.snapshot_kind, args.source_dir, args.dest_dir, args.machine, args.read_write ); extra_args.database_connection.execute(statement)?; @@ -52,7 +52,7 @@ pub fn return_all_data(connection: &Connection) -> Result> { let mut snapshots_data: Vec = Vec::new(); let mut statement = connection - .prepare("SELECT name,snap_id,kind,source,destination,ro_rw,datetime(date, 'localtime') FROM snapshots ORDER BY date DESC")?; + .prepare("SELECT name,snap_id,kind,source,destination,machine,ro_rw,datetime(date, 'localtime') FROM snapshots ORDER BY date DESC")?; while statement.next()? == State::Row { let db_struct = Database::default(); @@ -65,7 +65,7 @@ pub fn return_all_data(connection: &Connection) -> Result> { pub fn return_only_x_items(connection: &Connection, args: &Args) -> Result> { let mut snapshots_data: Vec = Vec::new(); - let mut statement = connection.prepare(&format!("SELECT name,snap_id,kind,source,destination,ro_rw,date FROM (SELECT row_number() over(ORDER BY date DESC) n,* from snapshots WHERE name like '{}%' AND kind = '{}' AND ro_rw = '{}') WHERE n > {}", args.snapshot_prefix, args.snapshot_kind, args.read_write, args.keep_only))?; + let mut statement = connection.prepare(&format!("SELECT name,snap_id,kind,source,destination,machine,ro_rw,date FROM (SELECT row_number() over(ORDER BY date DESC) n,* from snapshots WHERE name like '{}%' AND kind = '{}' AND ro_rw = '{}') WHERE n > {}", args.snapshot_prefix, args.snapshot_kind, args.read_write, args.keep_only))?; while statement.next()? == State::Row { let db_struct = Database::default(); @@ -83,8 +83,9 @@ fn populate_db_struct(row: &Statement, mut db_struct: Database) -> Result Result<()> { let mut arguments = args::Args::parse(); diff --git a/src/structs.rs b/src/structs.rs index 9f3e655..ddad18d 100644 --- a/src/structs.rs +++ b/src/structs.rs @@ -8,6 +8,7 @@ pub struct Database { pub source: String, pub destination: String, pub ro_rw: String, + pub machine: String, pub date: String, } diff --git a/src/utils.rs b/src/utils.rs index 51bc0e3..3f63313 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -42,5 +42,9 @@ pub fn check_creation_requirements(arguments: &mut Args, extra_args: &ExtraArgs) .to_string(); } + if arguments.machine.is_empty() { + arguments.machine = hostname::get()?.to_string_lossy().to_string(); + } + Ok(()) } From e24d29c048632bface3ccba6ca45859a9ae6ff05 Mon Sep 17 00:00:00 2001 From: Eduard Tolosa Date: Wed, 7 Feb 2024 00:03:29 -0500 Subject: [PATCH 05/31] Update config templates. --- examples/config-templates/config-all.toml | 2 ++ examples/config-templates/config-home.toml | 2 ++ examples/config-templates/config-root.toml | 2 ++ 3 files changed, 6 insertions(+) diff --git a/examples/config-templates/config-all.toml b/examples/config-templates/config-all.toml index 50f148f..45599e6 100644 --- a/examples/config-templates/config-all.toml +++ b/examples/config-templates/config-all.toml @@ -13,3 +13,5 @@ snapshot_prefix = "root" snapshot_kind = "weekly" # Last snapshots to keep. If prefix is specified then only the snapshots with that prefix will be deleted keep_only = 2 +# Machine name to be used in the snapshots metadata +machine = "Oribos" diff --git a/examples/config-templates/config-home.toml b/examples/config-templates/config-home.toml index f139f97..716b6f0 100644 --- a/examples/config-templates/config-home.toml +++ b/examples/config-templates/config-home.toml @@ -8,3 +8,5 @@ database_file = "/.rusnapshot/rusnapshot.db" snapshot_prefix = "home" # Last snapshots to keep. If prefix is specified then only the snapshots with that prefix will be deleted keep_only = 2 +# Machine name to be used in the snapshots metadata +machine = "Oribos" \ No newline at end of file diff --git a/examples/config-templates/config-root.toml b/examples/config-templates/config-root.toml index 10e0227..95e4717 100644 --- a/examples/config-templates/config-root.toml +++ b/examples/config-templates/config-root.toml @@ -8,3 +8,5 @@ database_file = "/.rusnapshot/rusnapshot.db" snapshot_prefix = "root" # Last snapshots to keep. If prefix is specified then only the snapshots with that prefix will be deleted keep_only = 2 +# Machine name to be used in the snapshots metadata +machine = "Oribos" \ No newline at end of file From 01e518d3d357f696c84d7995a5897e90665f5be6 Mon Sep 17 00:00:00 2001 From: Eduard Tolosa Date: Wed, 7 Feb 2024 00:04:37 -0500 Subject: [PATCH 06/31] Update documentation. --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d7912cb..da2bf72 100644 --- a/README.md +++ b/README.md @@ -15,8 +15,9 @@ See the [docs folder](https://github.com/Edu4rdSHL/rusnapshot/blob/master/docs/) - Ability to use the same SQLite database for everything. - Ability to specify the prefix of the name for the snapshots for better identification. - Ability to specify a `kind` identifier to differentiate them in the database. Useful if you plan to have hourly, weekly, monthly or more "kind" of snapshots of the same subvolume(s). +- Ability to specify the maximum number of snapshots to keep for automatic cleanup. - Supports restoration of snapshots in the original directory or a specific one. -- Automatic snapshots cleanup. +- Supports machine name identification for better tracking when using the same database in multiple machines. - Nice CLI output to see the status and details of snapshots. # Known limitations From 235945c8e834d227cbba34cc81a8fcc02263cbf3 Mon Sep 17 00:00:00 2001 From: Eduard Tolosa Date: Wed, 7 Feb 2024 00:58:39 -0500 Subject: [PATCH 07/31] Update SETUP documentation --- docs/SETUP.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/SETUP.md b/docs/SETUP.md index 78dd227..943a002 100644 --- a/docs/SETUP.md +++ b/docs/SETUP.md @@ -14,7 +14,7 @@ - Create a snapshot using a [config file](https://github.com/Edu4rdSHL/rusnapshot/tree/master/examples/config-templates): -`sudo rusnapshot --config {{path/to/config.toml}} --cr` +`sudo rusnapshot --config {{path/to/config.toml}} --create` - List created snapshots: @@ -30,11 +30,11 @@ - Create a read-write snapshot: -`sudo rusnapshot -c {{path/to/config.toml}} --cr --rw` +`sudo rusnapshot -c {{path/to/config.toml}} --create --rw` - Restore a snapshot: -`sudo rusnapshot -c {{path/to/config.toml}} --id {{snapshot_id}} --restore` +`sudo rusnapshot --id {{snapshot_id}} --restore` # Notes From 41951edb8b442dc8d0f60092f50e751f30f7bf28 Mon Sep 17 00:00:00 2001 From: Eduard Tolosa Date: Wed, 7 Feb 2024 01:01:05 -0500 Subject: [PATCH 08/31] Rename file. --- docs/{SETUP.md => SETUP_AND_USAGE.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename docs/{SETUP.md => SETUP_AND_USAGE.md} (100%) diff --git a/docs/SETUP.md b/docs/SETUP_AND_USAGE.md similarity index 100% rename from docs/SETUP.md rename to docs/SETUP_AND_USAGE.md From 573c50d356cc3b4b80555d31398954c9bef46cb0 Mon Sep 17 00:00:00 2001 From: Eduard Tolosa Date: Wed, 7 Feb 2024 01:05:46 -0500 Subject: [PATCH 09/31] Create FUNDING.yml --- .github/FUNDING.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github/FUNDING.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..ff19fdb --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1 @@ +github: [edu4rdshl] From e421db40136e71042f4513bdceb313d8ad7a6f29 Mon Sep 17 00:00:00 2001 From: Eduard Tolosa Date: Sun, 20 Apr 2025 14:50:52 -0500 Subject: [PATCH 10/31] Clippy fixes --- src/args.rs | 4 ++-- src/database.rs | 2 +- src/operations.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/args.rs b/src/args.rs index d15cfba..e15537d 100644 --- a/src/args.rs +++ b/src/args.rs @@ -23,7 +23,7 @@ pub struct Args { /// Snapshot id or name to work with. #[clap(long = "id", default_value = "")] pub snapshot_id: String, - /// Path to the SQLite database file. + /// Path to the `SQLite` database file. #[clap( short = 'd', long = "dfile", @@ -40,7 +40,7 @@ pub struct Args { /// Keep only the last X items. #[clap(short = 'k', long = "keep", default_value = "10")] pub keep_only: usize, - /// Time in milliseconds until SQLite can return a timeout. Do not touch if you don't know what you are doing. + /// Time in milliseconds until `SQLite` can return a timeout. Do not touch if you don't know what you are doing. #[clap(long = "timeout", default_value = "5000")] pub timeout: usize, /// Create a read-only/ro snapshot. diff --git a/src/database.rs b/src/database.rs index 14d8de9..4987b58 100644 --- a/src/database.rs +++ b/src/database.rs @@ -65,7 +65,7 @@ pub fn return_all_data(connection: &Connection) -> Result> { pub fn return_only_x_items(connection: &Connection, args: &Args) -> Result> { let mut snapshots_data: Vec = Vec::new(); - let mut statement = connection.prepare(&format!("SELECT name,snap_id,kind,source,destination,machine,ro_rw,date FROM (SELECT row_number() over(ORDER BY date DESC) n,* from snapshots WHERE name like '{}%' AND kind = '{}' AND ro_rw = '{}') WHERE n > {}", args.snapshot_prefix, args.snapshot_kind, args.read_write, args.keep_only))?; + let mut statement = connection.prepare(format!("SELECT name,snap_id,kind,source,destination,machine,ro_rw,date FROM (SELECT row_number() over(ORDER BY date DESC) n,* from snapshots WHERE name like '{}%' AND kind = '{}' AND ro_rw = '{}') WHERE n > {}", args.snapshot_prefix, args.snapshot_kind, args.read_write, args.keep_only))?; while statement.next()? == State::Row { let db_struct = Database::default(); diff --git a/src/operations.rs b/src/operations.rs index 4e4b66c..6db1448 100644 --- a/src/operations.rs +++ b/src/operations.rs @@ -41,7 +41,7 @@ pub fn del_snapshot(snapshot_name: &str) -> bool { pub fn restore_snapshot(args: &Args, snapshot_name: &str) -> bool { !Path::new(&args.dest_dir).exists() && Command::new("btrfs") - .args(["subvolume", "snapshot", &snapshot_name, &args.dest_dir]) + .args(["subvolume", "snapshot", snapshot_name, &args.dest_dir]) .status() .expect("Error restoring the snapshot.") .success() From 844b6543b429afa06f4c4d22dc238ac57335d7e1 Mon Sep 17 00:00:00 2001 From: Eduard Tolosa Date: Sun, 20 Apr 2025 14:50:57 -0500 Subject: [PATCH 11/31] Update dependencies --- Cargo.lock | 426 ++++++++++++++++++++++++++++------------------------- Cargo.toml | 10 +- 2 files changed, 234 insertions(+), 202 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 829fa69..14fb936 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "android-tzdata" @@ -19,89 +19,85 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.11" +version = "0.6.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e2e1ebcb11de5c03c67de28a7df593d32191b44939c482e97702baaaa6ab6a5" +checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b" dependencies = [ "anstyle", "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", + "is_terminal_polyfill", "utf8parse", ] [[package]] name = "anstyle" -version = "1.0.5" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2faccea4cc4ab4a667ce676a30e8ec13922a692c99bb8f5b11f1502c72e04220" +checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" [[package]] name = "anstyle-parse" -version = "0.2.3" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" +checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.0.2" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" +checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c" dependencies = [ "windows-sys", ] [[package]] name = "anstyle-wincon" -version = "3.0.2" +version = "3.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" +checksum = "ca3534e77181a9cc07539ad51f2141fe32f6c3ffd4df76db8ad92346b003ae4e" dependencies = [ "anstyle", + "once_cell", "windows-sys", ] [[package]] name = "anyhow" -version = "1.0.79" +version = "1.0.98" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca" +checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487" [[package]] name = "autocfg" -version = "1.1.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "bitflags" -version = "1.3.2" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "bitflags" -version = "2.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" +checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd" [[package]] name = "bumpalo" -version = "3.14.0" +version = "3.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" +checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf" [[package]] name = "cc" -version = "1.0.83" +version = "1.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +checksum = "8e3a13707ac958681c13b39b458c073d0d9bc8a22cb1b2f4c8e55eb72c13f362" dependencies = [ - "libc", + "shlex", ] [[package]] @@ -112,23 +108,23 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.33" +version = "0.4.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f13690e35a5e4ace198e7beea2895d29f3a9cc55015fcebe6336bd2010af9eb" +checksum = "1a7964611d71df112cb1730f2ee67324fcf4d0fc6606acbbe9bfe06df124637c" dependencies = [ "android-tzdata", "iana-time-zone", "js-sys", "num-traits", "wasm-bindgen", - "windows-targets", + "windows-link", ] [[package]] name = "clap" -version = "4.4.18" +version = "4.5.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e578d6ec4194633722ccf9544794b71b1385c3c027efe0c55db226fc880865c" +checksum = "eccb054f56cbd38340b380d4a8e69ef1f02f1af43db2f0cc817a4774d80ae071" dependencies = [ "clap_builder", "clap_derive", @@ -136,9 +132,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.4.18" +version = "4.5.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4df4df40ec50c46000231c914968278b1eb05098cf8f1b3a518a95030e71d1c7" +checksum = "efd9466fac8543255d3b1fcad4762c5e116ffe808c8a3043d4263cd4fd4862a2" dependencies = [ "anstream", "anstyle", @@ -148,9 +144,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.4.7" +version = "4.5.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442" +checksum = "09176aae279615badda0765c0c0b3f6ed53f4709118af73cf4655d85d1530cd7" dependencies = [ "heck", "proc-macro2", @@ -160,27 +156,27 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.6.0" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" +checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6" [[package]] name = "colorchoice" -version = "1.0.0" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" +checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" [[package]] name = "core-foundation-sys" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "csv" -version = "1.3.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac574ff4d437a7b5ad237ef331c17ccca63c46479e5b5453eb8e10bb99a759fe" +checksum = "acdc4883a9c96732e4733212c01447ebd805833b7275a73ca3ee080fd77afdaf" dependencies = [ "csv-core", "itoa", @@ -190,9 +186,9 @@ dependencies = [ [[package]] name = "csv-core" -version = "0.1.11" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5efa2b3d7902f4b634a20cae3c9c4e6209dc4779feb6863329607560143efa70" +checksum = "7d02f3b0da4c6504f86e9cd789d8dbafab48c2321be74e9987593de5a894d93d" dependencies = [ "memchr", ] @@ -226,25 +222,15 @@ checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0" [[package]] name = "equivalent" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" - -[[package]] -name = "errno" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" -dependencies = [ - "libc", - "windows-sys", -] +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" [[package]] name = "getrandom" -version = "0.2.12" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", "libc", @@ -253,21 +239,21 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.14.3" +version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" +checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" [[package]] name = "heck" -version = "0.4.1" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "hermit-abi" -version = "0.3.4" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d3d0e0f38255e7fa3cf31335b3a56f05febd18025f4db5ef7a0cfb4f8da651f" +checksum = "fbd780fe5cc30f81464441920d82ac8740e2e46b29a6fad543ddd075229ce37e" [[package]] name = "hostname" @@ -282,14 +268,15 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.60" +version = "0.1.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" +checksum = "b0c919e5debc312ad217002b8048a17b7d83f80703865bbfcfebb0458b0b27d8" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", + "log", "wasm-bindgen", "windows-core", ] @@ -305,9 +292,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.2" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "824b2ae422412366ba479e8111fd301f7b5faece8149317bb81925979a53f520" +checksum = "cea70ddb795996207ad57735b50c5982d8844f38ba9ee5f1aedcfb708a2aa11e" dependencies = [ "equivalent", "hashbrown", @@ -315,64 +302,64 @@ dependencies = [ [[package]] name = "is-terminal" -version = "0.4.10" +version = "0.4.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bad00257d07be169d870ab665980b06cdb366d792ad690bf2e76876dc503455" +checksum = "e04d7f318608d35d4b61ddd75cbdaee86b023ebe2bd5a66ee0915f0bf93095a9" dependencies = [ "hermit-abi", - "rustix", + "libc", "windows-sys", ] [[package]] -name = "itoa" -version = "1.0.10" +name = "is_terminal_polyfill" +version = "1.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" + +[[package]] +name = "itoa" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" [[package]] name = "js-sys" -version = "0.3.67" +version = "0.3.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a1d36f1235bc969acba30b7f5990b864423a6068a10f7c90ae8f0112e3a59d1" +checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" dependencies = [ + "once_cell", "wasm-bindgen", ] [[package]] name = "lazy_static" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.153" +version = "0.2.172" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" +checksum = "d750af042f7ef4f724306de029d18836c26c1765a54a6a3f094cbd23a7267ffa" [[package]] name = "libredox" -version = "0.0.1" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" +checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ - "bitflags 2.4.2", + "bitflags", "libc", - "redox_syscall", ] -[[package]] -name = "linux-raw-sys" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" - [[package]] name = "log" -version = "0.4.20" +version = "0.4.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" [[package]] name = "match_cfg" @@ -388,30 +375,30 @@ checksum = "490cc448043f947bae3cbee9c203358d62dbee0db12107a74be5c30ccfd09771" [[package]] name = "memchr" -version = "2.7.1" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "num-traits" -version = "0.2.17" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", ] [[package]] name = "once_cell" -version = "1.19.0" +version = "1.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" [[package]] name = "pkg-config" -version = "0.3.29" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2900ede94e305130c13ddd391e0ab7cbaeb783945ae07a279c268cb05109c6cb" +checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" [[package]] name = "prettytable-rs" @@ -429,36 +416,27 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.78" +version = "1.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" +checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.35" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" dependencies = [ "proc-macro2", ] -[[package]] -name = "redox_syscall" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" -dependencies = [ - "bitflags 1.3.2", -] - [[package]] name = "redox_users" -version = "0.4.4" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" +checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" dependencies = [ "getrandom", "libredox", @@ -480,45 +458,32 @@ dependencies = [ "toml", ] -[[package]] -name = "rustix" -version = "0.38.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949" -dependencies = [ - "bitflags 2.4.2", - "errno", - "libc", - "linux-raw-sys", - "windows-sys", -] - [[package]] name = "rustversion" -version = "1.0.14" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" +checksum = "eded382c5f5f786b989652c49544c4877d9f015cc22e145a5ea8ea66c2921cd2" [[package]] name = "ryu" -version = "1.0.16" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" +checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" [[package]] name = "serde" -version = "1.0.196" +version = "1.0.219" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "870026e60fa08c69f064aa766c10f10b1d62db9ccd4d0abb206472bee0ce3b32" +checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.196" +version = "1.0.219" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67" +checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" dependencies = [ "proc-macro2", "quote", @@ -527,13 +492,19 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.5" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" +checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" dependencies = [ "serde", ] +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + [[package]] name = "sqlite" version = "0.33.0" @@ -546,9 +517,9 @@ dependencies = [ [[package]] name = "sqlite3-src" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9448d45899495acd1a46b0b888ae9747c13551fb0d8f4a60ab485da52b040503" +checksum = "174d4a6df77c27db281fb23de1a6d968f3aaaa4807c2a1afa8056b971f947b4a" dependencies = [ "cc", "pkg-config", @@ -566,15 +537,15 @@ dependencies = [ [[package]] name = "strsim" -version = "0.10.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "syn" -version = "2.0.48" +version = "2.0.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" +checksum = "b09a44accad81e1ba1cd74a32461ba89dee89095ba17b32f5d03683b1b1fc2a0" dependencies = [ "proc-macro2", "quote", @@ -594,18 +565,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.56" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54378c645627613241d077a3a79db965db602882668f9136ac42af9ecb730ad" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.56" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa0faa943b50f3db30a20aa7e265dbc66076993efed8463e8de414e5d06d3471" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", @@ -614,9 +585,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.9" +version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6a4b9e8023eb94392d3dca65d717c53abc5dad49c07cb65bb8fcd87115fa325" +checksum = "cd87a5cdd6ffab733b2f74bc4fd7ee5fff6634124999ac278c35fc78c6120148" dependencies = [ "serde", "serde_spanned", @@ -626,18 +597,18 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.5" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" dependencies = [ "serde", ] [[package]] name = "toml_edit" -version = "0.21.1" +version = "0.22.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" +checksum = "17b4795ff5edd201c7cd6dca065ae59972ce77d1b80fa0a84d94950ece7d1474" dependencies = [ "indexmap", "serde", @@ -648,21 +619,21 @@ dependencies = [ [[package]] name = "unicode-ident" -version = "1.0.12" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" [[package]] name = "unicode-width" -version = "0.1.11" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" +checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" [[package]] name = "utf8parse" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "wasi" @@ -672,23 +643,24 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.90" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1223296a201415c7fad14792dbefaace9bd52b62d33453ade1c5b5f07555406" +checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" dependencies = [ "cfg-if", + "once_cell", + "rustversion", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.90" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcdc935b63408d58a32f8cc9738a0bffd8f05cc7c002086c6ef20b7312ad9dcd" +checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" dependencies = [ "bumpalo", "log", - "once_cell", "proc-macro2", "quote", "syn", @@ -697,9 +669,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.90" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e4c238561b2d428924c49815533a8b9121c664599558a5d9ec51f8a1740a999" +checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -707,9 +679,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.90" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bae1abb6806dc1ad9e560ed242107c0f6c84335f1749dd4e8ddb012ebd5e25a7" +checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2", "quote", @@ -720,9 +692,12 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.90" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d91413b1c31d7539ba5ef2451af3f0b833a005eb27a631cec32bc0635a8602b" +checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" +dependencies = [ + "unicode-ident", +] [[package]] name = "winapi" @@ -748,31 +723,82 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows-core" -version = "0.52.0" +version = "0.61.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +checksum = "4763c1de310c86d75a878046489e2e5ba02c649d185f21c67d4cf8a56d098980" dependencies = [ - "windows-targets", + "windows-implement", + "windows-interface", + "windows-link", + "windows-result", + "windows-strings", +] + +[[package]] +name = "windows-implement" +version = "0.60.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "windows-interface" +version = "0.59.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "windows-link" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76840935b766e1b0a05c0066835fb9ec80071d4c09a16f6bd5f7e655e3c14c38" + +[[package]] +name = "windows-result" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c64fd11a4fd95df68efcfee5f44a294fe71b8bc6a91993e2791938abcc712252" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-strings" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a2ba9642430ee452d5a7aa78d72907ebe8cfda358e8cb7918a2050581322f97" +dependencies = [ + "windows-link", ] [[package]] name = "windows-sys" -version = "0.52.0" +version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" dependencies = [ "windows-targets", ] [[package]] name = "windows-targets" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ "windows_aarch64_gnullvm", "windows_aarch64_msvc", "windows_i686_gnu", + "windows_i686_gnullvm", "windows_i686_msvc", "windows_x86_64_gnu", "windows_x86_64_gnullvm", @@ -781,51 +807,57 @@ dependencies = [ [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.5.37" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7cad8365489051ae9f054164e459304af2e7e9bb407c958076c8bf4aef52da5" +checksum = "63d3fcd9bba44b03821e7d699eeee959f3126dcc4aa8e4ae18ec617c2a5cea10" dependencies = [ "memchr", ] diff --git a/Cargo.toml b/Cargo.toml index 86acef3..1f697ad 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,14 +8,14 @@ description = "Simple and handy btrfs snapshoting tool." # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -clap = { version = "4.4.18", features = ["derive", "env"] } -serde = { version = "1.0.188", features = ["derive"] } +clap = { version = "4.5.37", features = ["derive", "env"] } +serde = { version = "1.0.219", features = ["derive"] } sqlite = "0.33.0" md5 = "0.7.0" -chrono = "0.4.33" +chrono = "0.4.40" prettytable-rs = "0.10.0" -anyhow = "1.0.79" -toml = "0.8.9" +anyhow = "1.0.98" +toml = "0.8.20" hostname = "0.3.1" From b8b2c6f0f85b2dcfbccfe58b3c76d10e862b0abb Mon Sep 17 00:00:00 2001 From: Eduard Tolosa Date: Sat, 3 May 2025 23:33:54 -0500 Subject: [PATCH 12/31] (chore): more sensible defaults. --- src/args.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/args.rs b/src/args.rs index e15537d..62fe50d 100644 --- a/src/args.rs +++ b/src/args.rs @@ -38,10 +38,10 @@ pub struct Args { #[clap(long = "kind", default_value = "rusnapshot")] pub snapshot_kind: String, /// Keep only the last X items. - #[clap(short = 'k', long = "keep", default_value = "10")] + #[clap(short = 'k', long = "keep", default_value = "3")] pub keep_only: usize, /// Time in milliseconds until `SQLite` can return a timeout. Do not touch if you don't know what you are doing. - #[clap(long = "timeout", default_value = "5000")] + #[clap(long = "timeout", default_value = "10000")] pub timeout: usize, /// Create a read-only/ro snapshot. #[clap(long = "create", conflicts_with_all = &["restore_snapshot", "delete_snapshot", "list_snapshots", "clean_snapshots"])] From 0b117ac07cbe578102bfbc99e8deff97c1a3e44a Mon Sep 17 00:00:00 2001 From: Eduard Tolosa Date: Sat, 3 May 2025 23:34:16 -0500 Subject: [PATCH 13/31] (docs): point out the main feature and update description. --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index da2bf72..65e0f90 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Description -Simple and handy btrfs snapshoting tool. Supports unattended snapshots, tracking, restoring, automatic cleanup and more. Backed with SQLite. +Simple and handy definitions-based snapshoting tool for BTRFS. Supports unattended snapshots, tracking, restoring, automatic cleanup and more. Backed with SQLite. # Documentation @@ -7,6 +7,10 @@ See the [docs folder](https://github.com/Edu4rdSHL/rusnapshot/blob/master/docs/) # Features +**The main feature of Rustnapshot is the ability to create snapshots of BTRFS subvolumes using simple TOML definitions. It is designed to be simple and easy to use, while still providing powerful features for managing snapshots. See [the examples folder](https://github.com/Edu4rdSHL/rusnapshot/tree/master/examples) for more information.** + +Among the features of Rustnapshot are: + - Allows you to specify the origin and destination of snapshots at will of the user. - Track snapshots using SQLite as backend database. - Easy setup using small templates instead of confusing long files. From 5e1a3e711541dcc09737a20b8f463a00f9adacb0 Mon Sep 17 00:00:00 2001 From: Eduard Tolosa Date: Sat, 3 May 2025 23:34:36 -0500 Subject: [PATCH 14/31] (chore): clippy fix. --- src/controller.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controller.rs b/src/controller.rs index 2b3f95c..dde372d 100644 --- a/src/controller.rs +++ b/src/controller.rs @@ -106,7 +106,7 @@ pub fn keep_only_x(args: &mut Args, extra_args: &mut ExtraArgs) -> Result<()> { for data in &snaps_data { extra_args.snapshot_name = data.destination.clone() + &data.name; - args.snapshot_id = data.snap_id.clone(); + args.snapshot_id.clone_from(&data.snap_id); manage_deletion(args, extra_args)?; } From bd0887f4168d396741256748c6c824679e3237bc Mon Sep 17 00:00:00 2001 From: Eduard Tolosa Date: Sat, 3 May 2025 23:34:47 -0500 Subject: [PATCH 15/31] (chore): update deps. --- Cargo.lock | 71 +++++++++++++++++++++++++++--------------------------- Cargo.toml | 8 +++--- 2 files changed, 39 insertions(+), 40 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 14fb936..a2ab44c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -93,9 +93,9 @@ checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf" [[package]] name = "cc" -version = "1.2.19" +version = "1.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e3a13707ac958681c13b39b458c073d0d9bc8a22cb1b2f4c8e55eb72c13f362" +checksum = "8691782945451c1c383942c4874dbe63814f61cb57ef773cda2972682b7bb3c0" dependencies = [ "shlex", ] @@ -108,9 +108,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.40" +version = "0.4.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a7964611d71df112cb1730f2ee67324fcf4d0fc6606acbbe9bfe06df124637c" +checksum = "c469d952047f47f91b68d1cba3f10d63c11d73e4636f24f08daf0278abf01c4d" dependencies = [ "android-tzdata", "iana-time-zone", @@ -228,9 +228,9 @@ checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" [[package]] name = "getrandom" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" dependencies = [ "cfg-if", "libc", @@ -239,9 +239,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.15.2" +version = "0.15.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" +checksum = "84b26c544d002229e640969970a2e74021aadf6e2f96372b9c58eff97de08eb3" [[package]] name = "heck" @@ -257,13 +257,13 @@ checksum = "fbd780fe5cc30f81464441920d82ac8740e2e46b29a6fad543ddd075229ce37e" [[package]] name = "hostname" -version = "0.3.1" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c731c3e10504cc8ed35cfe2f1db4c9274c3d35fa486e3b31df46f068ef3e867" +checksum = "a56f203cd1c76362b69e3863fd987520ac36cf70a8c92627449b2f64a8cf7d65" dependencies = [ + "cfg-if", "libc", - "match_cfg", - "winapi", + "windows-link", ] [[package]] @@ -361,12 +361,6 @@ version = "0.4.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" -[[package]] -name = "match_cfg" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4" - [[package]] name = "md5" version = "0.7.0" @@ -507,19 +501,18 @@ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] name = "sqlite" -version = "0.33.0" +version = "0.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78a97f6ee5b054b7cfddc3b6613fdea4c77af2ef8f8aac3048c7d0be31e605e3" +checksum = "f66e9c01a11936154f3910dbba732c01f8b591543bc4d6672bddee79fd9c4783" dependencies = [ - "libc", "sqlite3-sys", ] [[package]] name = "sqlite3-src" -version = "0.6.1" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "174d4a6df77c27db281fb23de1a6d968f3aaaa4807c2a1afa8056b971f947b4a" +checksum = "e5b6d3c860886b0a33e69e421796a5f4a27f23597a182c2450f6d7ace5103120" dependencies = [ "cc", "pkg-config", @@ -527,11 +520,10 @@ dependencies = [ [[package]] name = "sqlite3-sys" -version = "0.16.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aed0b61828382e1103930d2d5df1972d493173319730b481192e63d929097321" +checksum = "a7781d97adc13a1d5081127a9ee29afad8427f3757bd984daf814d8265267039" dependencies = [ - "libc", "sqlite3-src", ] @@ -543,9 +535,9 @@ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "syn" -version = "2.0.100" +version = "2.0.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b09a44accad81e1ba1cd74a32461ba89dee89095ba17b32f5d03683b1b1fc2a0" +checksum = "8ce2b7fc941b3a24138a0a7cf8e858bfc6a992e7978a068a5c760deb0ed43caf" dependencies = [ "proc-macro2", "quote", @@ -585,9 +577,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.20" +version = "0.8.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd87a5cdd6ffab733b2f74bc4fd7ee5fff6634124999ac278c35fc78c6120148" +checksum = "05ae329d1f08c4d17a59bed7ff5b5a769d062e64a62d34a3261b219e62cd5aae" dependencies = [ "serde", "serde_spanned", @@ -597,26 +589,33 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.8" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" +checksum = "3da5db5a963e24bc68be8b17b6fa82814bb22ee8660f192bb182771d498f09a3" dependencies = [ "serde", ] [[package]] name = "toml_edit" -version = "0.22.24" +version = "0.22.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17b4795ff5edd201c7cd6dca065ae59972ce77d1b80fa0a84d94950ece7d1474" +checksum = "310068873db2c5b3e7659d2cc35d21855dbafa50d1ce336397c666e3cb08137e" dependencies = [ "indexmap", "serde", "serde_spanned", "toml_datetime", + "toml_write", "winnow", ] +[[package]] +name = "toml_write" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfb942dfe1d8e29a7ee7fcbde5bd2b9a25fb89aa70caea2eba3bee836ff41076" + [[package]] name = "unicode-ident" version = "1.0.18" @@ -855,9 +854,9 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.7.6" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63d3fcd9bba44b03821e7d699eeee959f3126dcc4aa8e4ae18ec617c2a5cea10" +checksum = "d9fb597c990f03753e08d3c29efbfcf2019a003b4bf4ba19225c158e1549f0f3" dependencies = [ "memchr", ] diff --git a/Cargo.toml b/Cargo.toml index 1f697ad..1cf1541 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,13 +10,13 @@ description = "Simple and handy btrfs snapshoting tool." [dependencies] clap = { version = "4.5.37", features = ["derive", "env"] } serde = { version = "1.0.219", features = ["derive"] } -sqlite = "0.33.0" +sqlite = "0.37.0" md5 = "0.7.0" -chrono = "0.4.40" +chrono = "0.4.41" prettytable-rs = "0.10.0" anyhow = "1.0.98" -toml = "0.8.20" -hostname = "0.3.1" +toml = "0.8.22" +hostname = "0.4.1" [profile.release] From 2a2058f78157927ac9975319c9924a5bcd4e40c9 Mon Sep 17 00:00:00 2001 From: Eduard Tolosa Date: Sat, 3 May 2025 23:37:48 -0500 Subject: [PATCH 16/31] (build): disable LTO by default --- Cargo.toml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 1cf1541..8277743 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,6 @@ name = "rusnapshot" version = "0.4.1" authors = ["edu4rdshl"] -edition = "2018" description = "Simple and handy btrfs snapshoting tool." # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -17,11 +16,3 @@ prettytable-rs = "0.10.0" anyhow = "1.0.98" toml = "0.8.22" hostname = "0.4.1" - - -[profile.release] -lto = true -codegen-units = 1 -panic = 'abort' -incremental = false -opt-level = "s" From 7b363e0207bd43c907e62db83d4febdbc7a4b88e Mon Sep 17 00:00:00 2001 From: Eduard Tolosa Date: Sun, 4 May 2025 00:12:50 -0500 Subject: [PATCH 17/31] (chore): bump version --- Cargo.lock | 2 +- Cargo.toml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a2ab44c..7ee8e50 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -439,7 +439,7 @@ dependencies = [ [[package]] name = "rusnapshot" -version = "0.4.1" +version = "0.5.0" dependencies = [ "anyhow", "chrono", diff --git a/Cargo.toml b/Cargo.toml index 8277743..6d1c8a5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,8 @@ [package] name = "rusnapshot" -version = "0.4.1" +version = "0.5.0" authors = ["edu4rdshl"] +edition = "2018" description = "Simple and handy btrfs snapshoting tool." # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html From 8f67b4d0442f5fcb5b8415002a28a2ead9dc0453 Mon Sep 17 00:00:00 2001 From: Eduard Tolosa Date: Sun, 4 May 2025 00:19:51 -0500 Subject: [PATCH 18/31] (chore): update edition --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 6d1c8a5..eedccd1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "rusnapshot" version = "0.5.0" authors = ["edu4rdshl"] -edition = "2018" +edition = "2024" description = "Simple and handy btrfs snapshoting tool." # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html From 97fa3938250b6d7225469c8ae8e087d1c61d3da4 Mon Sep 17 00:00:00 2001 From: Eduard Tolosa Date: Sun, 4 May 2025 00:33:15 -0500 Subject: [PATCH 19/31] Create LICENSE --- LICENSE | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..d33da15 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025 Eduard Tolosa + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. From b47ebd7616207de42b936cc81fbf8c491f80b3e7 Mon Sep 17 00:00:00 2001 From: Eduard Tolosa Date: Sun, 4 May 2025 01:41:49 -0500 Subject: [PATCH 20/31] (feat): update examples. --- examples/config-templates/config-all.toml | 6 +++--- examples/config-templates/config-home.toml | 8 ++++---- examples/config-templates/config-root.toml | 8 ++++---- ...t-three-hours.service => rusnapshot-daily.service} | 11 ++++------- examples/services/rusnapshot-daily.timer | 9 +++++++++ examples/services/rusnapshot-monthly.service | 8 ++++---- examples/services/rusnapshot-three-hours.timer | 9 --------- examples/services/rusnapshot-weekly.service | 8 ++++---- 8 files changed, 32 insertions(+), 35 deletions(-) rename examples/services/{rusnapshot-three-hours.service => rusnapshot-daily.service} (64%) create mode 100644 examples/services/rusnapshot-daily.timer delete mode 100644 examples/services/rusnapshot-three-hours.timer diff --git a/examples/config-templates/config-all.toml b/examples/config-templates/config-all.toml index 45599e6..3db87b6 100644 --- a/examples/config-templates/config-all.toml +++ b/examples/config-templates/config-all.toml @@ -2,16 +2,16 @@ # These are all the current available options # Snapshots directory -dest_dir = "/.rusnapshot" +dest_dir = "/.snapshots" # Directory to be snapshot-ed source_dir = "/" # SQLite database file PATH where snapshots metadata will be stored. Created if not exists -database_file = "/.rusnapshot/rusnapshot.db" +database_file = "/.snapshots/rusnapshot.db" # Prefix for the snapshots, they will be saved in the format prefix-$current_date snapshot_prefix = "root" # Snapshots identifier snapshot_kind = "weekly" # Last snapshots to keep. If prefix is specified then only the snapshots with that prefix will be deleted -keep_only = 2 +keep_only = 3 # Machine name to be used in the snapshots metadata machine = "Oribos" diff --git a/examples/config-templates/config-home.toml b/examples/config-templates/config-home.toml index 716b6f0..ea9b505 100644 --- a/examples/config-templates/config-home.toml +++ b/examples/config-templates/config-home.toml @@ -1,12 +1,12 @@ # Snapshots directory -dest_dir = "/.rusnapshot" +dest_dir = "/.snapshots" # Directory to be snapshot-ed source_dir = "/home" # SQLite database file PATH where snapshots metadata will be stored. Created if not exists -database_file = "/.rusnapshot/rusnapshot.db" +database_file = "/.snapshots/rusnapshot.db" # Prefix for the snapshots, they will be saved in the format prefix-$current_date snapshot_prefix = "home" # Last snapshots to keep. If prefix is specified then only the snapshots with that prefix will be deleted -keep_only = 2 +keep_only = 3 # Machine name to be used in the snapshots metadata -machine = "Oribos" \ No newline at end of file +machine = "Oribos" diff --git a/examples/config-templates/config-root.toml b/examples/config-templates/config-root.toml index 95e4717..4443ff7 100644 --- a/examples/config-templates/config-root.toml +++ b/examples/config-templates/config-root.toml @@ -1,12 +1,12 @@ # Snapshots directory -dest_dir = "/.rusnapshot" +dest_dir = "/.snapshots" # Directory to be snapshot-ed source_dir = "/" # SQLite database file PATH where snapshots metadata will be stored. Created if not exists -database_file = "/.rusnapshot/rusnapshot.db" +database_file = "/.snapshots/rusnapshot.db" # Prefix for the snapshots, they will be saved in the format prefix-$current_date snapshot_prefix = "root" # Last snapshots to keep. If prefix is specified then only the snapshots with that prefix will be deleted -keep_only = 2 +keep_only = 3 # Machine name to be used in the snapshots metadata -machine = "Oribos" \ No newline at end of file +machine = "Oribos" diff --git a/examples/services/rusnapshot-three-hours.service b/examples/services/rusnapshot-daily.service similarity index 64% rename from examples/services/rusnapshot-three-hours.service rename to examples/services/rusnapshot-daily.service index b1f5a73..f077e1c 100644 --- a/examples/services/rusnapshot-three-hours.service +++ b/examples/services/rusnapshot-daily.service @@ -3,10 +3,7 @@ Description=Snapshot root directory. [Service] Type=oneshot -ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-root.toml --cr --clean --kind three-hours -ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-root.toml --cr --clean --kind three-hours --rw -ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-home.toml --cr --clean --kind three-hours -ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-home.toml --cr --clean --kind three-hours --rw - -[Install] -WantedBy=default.target \ No newline at end of file +ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-root.toml --create --kind daily +ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-root.toml --clean --kind daily +ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-home.toml --create --kind daily +ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-home.toml --clean --kind daily diff --git a/examples/services/rusnapshot-daily.timer b/examples/services/rusnapshot-daily.timer new file mode 100644 index 0000000..81f1abd --- /dev/null +++ b/examples/services/rusnapshot-daily.timer @@ -0,0 +1,9 @@ +[Unit] +Description=Take snapshots daily. + +[Timer] +OnCalendar=daily +Persistent=true + +[Install] +WantedBy=timers.target \ No newline at end of file diff --git a/examples/services/rusnapshot-monthly.service b/examples/services/rusnapshot-monthly.service index ac9eefd..71ce7c8 100644 --- a/examples/services/rusnapshot-monthly.service +++ b/examples/services/rusnapshot-monthly.service @@ -3,10 +3,10 @@ Description=Take system snapshots monthly. [Service] Type=oneshot -ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-root.toml --cr --clean --kind monthly -ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-root.toml --cr --clean --kind monthly --rw -ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-home.toml --cr --clean --kind monthly -ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-home.toml --cr --clean --kind monthly --rw +ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-root.toml --create --kind monthly +ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-root.toml --clean --kind monthly +ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-home.toml --create --kind monthly +ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-home.toml --clean --kind monthly [Install] WantedBy=default.target \ No newline at end of file diff --git a/examples/services/rusnapshot-three-hours.timer b/examples/services/rusnapshot-three-hours.timer deleted file mode 100644 index 54ef618..0000000 --- a/examples/services/rusnapshot-three-hours.timer +++ /dev/null @@ -1,9 +0,0 @@ -[Unit] -Description=Take snapshots every 3 hours. - -[Timer] -OnBootSec=1h -OnUnitActiveSec=3h - -[Install] -WantedBy=timers.target \ No newline at end of file diff --git a/examples/services/rusnapshot-weekly.service b/examples/services/rusnapshot-weekly.service index 25ad102..155ba82 100644 --- a/examples/services/rusnapshot-weekly.service +++ b/examples/services/rusnapshot-weekly.service @@ -3,10 +3,10 @@ Description=Take system snapshots weekly. [Service] Type=oneshot -ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-root.toml --cr --clean --kind weekly -ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-root.toml --cr --clean --kind weekly --rw -ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-home.toml --cr --clean --kind weekly -ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-home.toml --cr --clean --kind weekly --rw +ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-root.toml --create --kind weekly +ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-root.toml --clean --kind weekly +ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-home.toml --create --kind weekly +ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-home.toml --clean --kind weekly [Install] WantedBy=default.target \ No newline at end of file From f23e74c610ff78dd5c6d07b8d23156fbc4d04442 Mon Sep 17 00:00:00 2001 From: Eduard Tolosa Date: Sun, 4 May 2025 01:59:44 -0500 Subject: [PATCH 21/31] (feat): improve database handling. --- src/controller.rs | 4 ++-- src/database.rs | 40 +++++++++++++++++++++------------------- 2 files changed, 23 insertions(+), 21 deletions(-) diff --git a/src/controller.rs b/src/controller.rs index dde372d..9593370 100644 --- a/src/controller.rs +++ b/src/controller.rs @@ -2,7 +2,7 @@ use { crate::{args::Args, database, operations, structs::ExtraArgs}, anyhow::Result, md5, - prettytable::{row, Table}, + prettytable::{Table, row}, sqlite::Connection, }; @@ -80,7 +80,7 @@ pub fn manage_listing(database_connection: &Connection) -> Result<()> { "SOURCE DIR", "DESTINATION DIR", "MACHINE", - "RO/RW", + "RW", "DATE" ]); diff --git a/src/database.rs b/src/database.rs index 4987b58..8ffa8fc 100644 --- a/src/database.rs +++ b/src/database.rs @@ -17,7 +17,13 @@ pub fn setup_initial_database(connection: &Connection) -> Result<()> { pub fn commit_to_database(args: &Args, extra_args: &ExtraArgs) -> Result<()> { let statement = format!( "INSERT INTO snapshots (name, snap_id, kind, source, destination, machine, ro_rw) VALUES ('{}', '{}', '{}', '{}', '{}', '{}', '{}')", - &extra_args.snapshot_name, args.snapshot_id, args.snapshot_kind, args.source_dir, args.dest_dir, args.machine, args.read_write + &extra_args.snapshot_name, + args.snapshot_id, + args.snapshot_kind, + args.source_dir, + args.dest_dir, + args.machine, + args.read_write ); extra_args.database_connection.execute(statement)?; @@ -42,7 +48,7 @@ pub fn return_snapshot_data(connection: &Connection, args: &Args) -> Result Result> { .prepare("SELECT name,snap_id,kind,source,destination,machine,ro_rw,datetime(date, 'localtime') FROM snapshots ORDER BY date DESC")?; while statement.next()? == State::Row { - let db_struct = Database::default(); - snapshots_data.push(populate_db_struct(&statement, db_struct)?); + snapshots_data.push(populate_db_struct(&statement)?); } Ok(snapshots_data) @@ -68,24 +73,21 @@ pub fn return_only_x_items(connection: &Connection, args: &Args) -> Result {}", args.snapshot_prefix, args.snapshot_kind, args.read_write, args.keep_only))?; while statement.next()? == State::Row { - let db_struct = Database::default(); - snapshots_data.push(populate_db_struct(&statement, db_struct)?); + snapshots_data.push(populate_db_struct(&statement)?); } Ok(snapshots_data) } -fn populate_db_struct(row: &Statement, mut db_struct: Database) -> Result { - // I'll improve this later. - - db_struct.name = row.read(0)?; - db_struct.snap_id = row.read(1)?; - db_struct.kind = row.read(2)?; - db_struct.source = row.read(3)?; - db_struct.destination = row.read(4)?; - db_struct.machine = row.read(5)?; - db_struct.ro_rw = row.read(6)?; - db_struct.date = row.read(7)?; - - Ok(db_struct) +fn populate_db_struct(stmt: &Statement) -> Result { + Ok(Database { + name: stmt.read(0)?, + snap_id: stmt.read(1)?, + kind: stmt.read(2)?, + source: stmt.read(3)?, + destination: stmt.read(4)?, + machine: stmt.read(5)?, + ro_rw: stmt.read(6)?, + date: stmt.read(7)?, + }) } From ae403db7843f0272169c98ba6b2a41b327ee97ae Mon Sep 17 00:00:00 2001 From: Eduard Tolosa Date: Sun, 4 May 2025 02:00:36 -0500 Subject: [PATCH 22/31] (chore): bump version. --- Cargo.lock | 2 +- Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7ee8e50..e9514e4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -439,7 +439,7 @@ dependencies = [ [[package]] name = "rusnapshot" -version = "0.5.0" +version = "0.5.1" dependencies = [ "anyhow", "chrono", diff --git a/Cargo.toml b/Cargo.toml index eedccd1..e745135 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rusnapshot" -version = "0.5.0" +version = "0.5.1" authors = ["edu4rdshl"] edition = "2024" description = "Simple and handy btrfs snapshoting tool." From bfca23d1c7ba564747cff780763d76de8c4fbef5 Mon Sep 17 00:00:00 2001 From: Eduard Tolosa Date: Sun, 4 May 2025 02:01:54 -0500 Subject: [PATCH 23/31] (chore): bump version. --- Cargo.lock | 2 +- Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e9514e4..afc233f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -439,7 +439,7 @@ dependencies = [ [[package]] name = "rusnapshot" -version = "0.5.1" +version = "0.5.2" dependencies = [ "anyhow", "chrono", diff --git a/Cargo.toml b/Cargo.toml index e745135..ba0dc9d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rusnapshot" -version = "0.5.1" +version = "0.5.2" authors = ["edu4rdshl"] edition = "2024" description = "Simple and handy btrfs snapshoting tool." From d57c34e9d1920a80020ae54218084e1cc4c582d3 Mon Sep 17 00:00:00 2001 From: Eduard Tolosa Date: Sat, 2 Aug 2025 13:00:58 -0500 Subject: [PATCH 24/31] (chore): update builder.sh - Disable docker checks, we now use podman - Use cross for all builds, otherwise the build ends up in glibc versions mismatch --- builder.sh | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/builder.sh b/builder.sh index 5156b1f..1f896d0 100755 --- a/builder.sh +++ b/builder.sh @@ -5,17 +5,9 @@ LINUX_TARGET="x86_64-unknown-linux-musl" LINUX_X86_TARGET="i686-unknown-linux-musl" MANPAGE_DIR="./$NAME.1" -if ! systemctl is-active docker >/dev/null 2>&1; then - echo "Docker is not running. Starting docker." - if ! sudo systemctl start docker; then - echo "Failed to start docker." - exit 1 - fi -fi - # Linux build echo "Building Linux artifact." -if cargo build -q --release --target="$LINUX_TARGET"; then +if cross build -q --release --target="$LINUX_TARGET"; then echo "Linux artifact build: SUCCESS" cp "target/$LINUX_TARGET/release/$NAME" "target/$LINUX_TARGET/release/$NAME-linux" strip "target/$LINUX_TARGET/release/$NAME-linux" @@ -45,10 +37,3 @@ if command -v help2man >/dev/null; then else echo "Please install the help2man package." fi - -# Stop docker -echo "Stopping docker." -if ! sudo systemctl stop docker; then - echo "Failed to stop docker." - exit 1 -fi From c2d1d12abf586ecb446aa26e3b92152eeddec756 Mon Sep 17 00:00:00 2001 From: Eduard Tolosa Date: Sat, 2 Aug 2025 13:55:36 -0500 Subject: [PATCH 25/31] Update builder.sh --- builder.sh | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 60 insertions(+), 2 deletions(-) diff --git a/builder.sh b/builder.sh index 1f896d0..0078fb7 100755 --- a/builder.sh +++ b/builder.sh @@ -3,7 +3,15 @@ NAME="rusnapshot" LINUX_TARGET="x86_64-unknown-linux-musl" LINUX_X86_TARGET="i686-unknown-linux-musl" +WIN_TARGET="x86_64-pc-windows-gnu" +ARMV7_TARGET="armv7-unknown-linux-gnueabihf" +AARCH_TARGET="aarch64-unknown-linux-gnu" +# OSX_TARGET="x86_64-apple-darwin" MANPAGE_DIR="./$NAME.1" +BIN_OUTPUT_DIR="./ghbinaries" + +rm -rf "$BIN_OUTPUT_DIR" +mkdir -p "$BIN_OUTPUT_DIR" # Linux build echo "Building Linux artifact." @@ -11,7 +19,8 @@ if cross build -q --release --target="$LINUX_TARGET"; then echo "Linux artifact build: SUCCESS" cp "target/$LINUX_TARGET/release/$NAME" "target/$LINUX_TARGET/release/$NAME-linux" strip "target/$LINUX_TARGET/release/$NAME-linux" - sha512sum "target/$LINUX_TARGET/release/$NAME-linux" >"target/$LINUX_TARGET/release/$NAME-linux.sha512" + sha512sum "target/$LINUX_TARGET/release/$NAME-linux" >"$BIN_OUTPUT_DIR/$NAME-linux.sha512" + zip -q -j "$BIN_OUTPUT_DIR/$NAME-linux-x64.zip" "target/$LINUX_TARGET/release/$NAME-linux" else echo "Linux artifact build: FAILED" fi @@ -22,11 +31,60 @@ if cross build -q --release --target="$LINUX_X86_TARGET"; then echo "Linux x86 artifact build: SUCCESS" cp "target/$LINUX_X86_TARGET/release/$NAME" "target/$LINUX_X86_TARGET/release/$NAME-linux-i386" strip "target/$LINUX_X86_TARGET/release/$NAME-linux-i386" - sha512sum "target/$LINUX_X86_TARGET/release/$NAME-linux-i386" >"target/$LINUX_X86_TARGET/release/$NAME-linux-i386.sha512" + sha512sum "target/$LINUX_X86_TARGET/release/$NAME-linux-i386" >"$BIN_OUTPUT_DIR/$NAME-linux-i386.sha512" + zip -q -j "$BIN_OUTPUT_DIR/$NAME-linux-i386.zip" "target/$LINUX_X86_TARGET/release/$NAME-linux-i386" else echo "Linux x86 artifact build: FAILED" fi +# Windows build +echo "Building Windows artifact." +if cross build -q --release --target="$WIN_TARGET"; then + echo "Windows artifact build: SUCCESS" + cp "target/$WIN_TARGET/release/$NAME.exe" "target/$WIN_TARGET/release/$NAME-windows.exe" + strip "target/$WIN_TARGET/release/$NAME-windows.exe" + sha512sum "target/$WIN_TARGET/release/$NAME-windows.exe" >"$BIN_OUTPUT_DIR/$NAME-windows.exe.sha512" + zip -q -j "$BIN_OUTPUT_DIR/$NAME-windows.zip" "target/$WIN_TARGET/release/$NAME-windows.exe" +else + echo "Windows artifact build: FAILED" +fi + +# ARMV7 build +echo "Building ARMv7 artifact." +if cross build -q --release --target="$ARMV7_TARGET"; then + echo "ARMv7 artifact build: SUCCESS" + cp "target/$ARMV7_TARGET/release/$NAME" "target/$ARMV7_TARGET/release/$NAME-armv7" + strip "target/$ARMV7_TARGET/release/$NAME-armv7" + sha512sum "target/$ARMV7_TARGET/release/$NAME-armv7" >"$BIN_OUTPUT_DIR/$NAME-armv7.sha512" + zip -q -j "$BIN_OUTPUT_DIR/$NAME-armv7.zip" "target/$ARMV7_TARGET/release/$NAME-armv7" +else + echo "ARMv7 artifact build: FAILED" +fi + +# Aarch64 build +echo "Building Aarch64 artifact." +if cross build -q --release --target="$AARCH_TARGET"; then + echo "Aarch64 artifact build: SUCCESS" + cp "target/$AARCH_TARGET/release/$NAME" "target/$AARCH_TARGET/release/$NAME-aarch64" + strip "target/$AARCH_TARGET/release/$NAME-aarch64" + sha512sum "target/$AARCH_TARGET/release/$NAME-aarch64" >"$BIN_OUTPUT_DIR/$NAME-aarch64.sha512" + zip -q -j "$BIN_OUTPUT_DIR/$NAME-aarch64.zip" "target/$AARCH_TARGET/release/$NAME-aarch64" +else + echo "Aarch64 artifact build: FAILED" +fi + +# # Mac OS build +# echo "Building OSX artifact." +# if CC=o64-clang CXX=o64-clang++ LIBZ_SYS_STATIC=1 cargo build -q --release --target="$OSX_TARGET"; then +# echo "OSX artifact build: SUCCESS" +# cp "target/$OSX_TARGET/release/$NAME" "target/$OSX_TARGET/release/$NAME-osx" +# strip "target/$OSX_TARGET/release/$NAME-osx" +# sha512sum "target/$OSX_TARGET/release/$NAME-osx" >"target/$OSX_TARGET/release/$NAME-osx.sha512" +# zip -q "$BIN_OUTPUT_DIR/$NAME-osx.zip" "target/$OSX_TARGET/release/$NAME-osx" +# else +# echo "OSX artifact build: FAILED" +# fi + echo "Creating manpage..." if command -v help2man >/dev/null; then if help2man -o "$MANPAGE_DIR" "target/$LINUX_TARGET/release/$NAME"; then From 0285857b912fc2878b63eec2d97081d2f0858208 Mon Sep 17 00:00:00 2001 From: Eduard Tolosa Date: Sat, 2 Aug 2025 14:09:02 -0500 Subject: [PATCH 26/31] Exclude windows builds --- builder.sh | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/builder.sh b/builder.sh index 0078fb7..59abe81 100755 --- a/builder.sh +++ b/builder.sh @@ -3,10 +3,8 @@ NAME="rusnapshot" LINUX_TARGET="x86_64-unknown-linux-musl" LINUX_X86_TARGET="i686-unknown-linux-musl" -WIN_TARGET="x86_64-pc-windows-gnu" ARMV7_TARGET="armv7-unknown-linux-gnueabihf" AARCH_TARGET="aarch64-unknown-linux-gnu" -# OSX_TARGET="x86_64-apple-darwin" MANPAGE_DIR="./$NAME.1" BIN_OUTPUT_DIR="./ghbinaries" @@ -37,18 +35,6 @@ else echo "Linux x86 artifact build: FAILED" fi -# Windows build -echo "Building Windows artifact." -if cross build -q --release --target="$WIN_TARGET"; then - echo "Windows artifact build: SUCCESS" - cp "target/$WIN_TARGET/release/$NAME.exe" "target/$WIN_TARGET/release/$NAME-windows.exe" - strip "target/$WIN_TARGET/release/$NAME-windows.exe" - sha512sum "target/$WIN_TARGET/release/$NAME-windows.exe" >"$BIN_OUTPUT_DIR/$NAME-windows.exe.sha512" - zip -q -j "$BIN_OUTPUT_DIR/$NAME-windows.zip" "target/$WIN_TARGET/release/$NAME-windows.exe" -else - echo "Windows artifact build: FAILED" -fi - # ARMV7 build echo "Building ARMv7 artifact." if cross build -q --release --target="$ARMV7_TARGET"; then @@ -73,18 +59,6 @@ else echo "Aarch64 artifact build: FAILED" fi -# # Mac OS build -# echo "Building OSX artifact." -# if CC=o64-clang CXX=o64-clang++ LIBZ_SYS_STATIC=1 cargo build -q --release --target="$OSX_TARGET"; then -# echo "OSX artifact build: SUCCESS" -# cp "target/$OSX_TARGET/release/$NAME" "target/$OSX_TARGET/release/$NAME-osx" -# strip "target/$OSX_TARGET/release/$NAME-osx" -# sha512sum "target/$OSX_TARGET/release/$NAME-osx" >"target/$OSX_TARGET/release/$NAME-osx.sha512" -# zip -q "$BIN_OUTPUT_DIR/$NAME-osx.zip" "target/$OSX_TARGET/release/$NAME-osx" -# else -# echo "OSX artifact build: FAILED" -# fi - echo "Creating manpage..." if command -v help2man >/dev/null; then if help2man -o "$MANPAGE_DIR" "target/$LINUX_TARGET/release/$NAME"; then From 2c8c16ad4ebf2918f4a3911e5f02792a92cbd6d6 Mon Sep 17 00:00:00 2001 From: Eduard Tolosa Date: Sat, 2 Aug 2025 14:21:21 -0500 Subject: [PATCH 27/31] Bump dependencies --- Cargo.lock | 187 +++++++++++++++++++++++++++-------------------------- Cargo.toml | 6 +- 2 files changed, 97 insertions(+), 96 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index afc233f..fc2dd27 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -19,9 +19,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.18" +version = "0.6.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b" +checksum = "301af1932e46185686725e0fad2f8f2aa7da69dd70bf6ecc44d6b703844a3933" dependencies = [ "anstyle", "anstyle-parse", @@ -34,36 +34,36 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" +checksum = "862ed96ca487e809f1c8e5a8447f6ee2cf102f846893800b20cebdf541fc6bbd" [[package]] name = "anstyle-parse" -version = "0.2.6" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9" +checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c" +checksum = "6c8bdeb6047d8983be085bab0ba1472e6dc604e7041dbf6fcd5e71523014fae9" dependencies = [ "windows-sys", ] [[package]] name = "anstyle-wincon" -version = "3.0.7" +version = "3.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3534e77181a9cc07539ad51f2141fe32f6c3ffd4df76db8ad92346b003ae4e" +checksum = "403f75924867bb1033c59fbf0797484329750cfbe3c4325cd33127941fabc882" dependencies = [ "anstyle", - "once_cell", + "once_cell_polyfill", "windows-sys", ] @@ -75,36 +75,36 @@ checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487" [[package]] name = "autocfg" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" +checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" [[package]] name = "bitflags" -version = "2.9.0" +version = "2.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd" +checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967" [[package]] name = "bumpalo" -version = "3.17.0" +version = "3.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf" +checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" [[package]] name = "cc" -version = "1.2.21" +version = "1.2.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8691782945451c1c383942c4874dbe63814f61cb57ef773cda2972682b7bb3c0" +checksum = "c3a42d84bb6b69d3a8b3eaacf0d88f179e1929695e1ad012b6cf64d9caaa5fd2" dependencies = [ "shlex", ] [[package]] name = "cfg-if" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +checksum = "9555578bc9e57714c812a1f84e4fc5b4d21fcb063490c624de019f7464c91268" [[package]] name = "chrono" @@ -122,9 +122,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.37" +version = "4.5.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eccb054f56cbd38340b380d4a8e69ef1f02f1af43db2f0cc817a4774d80ae071" +checksum = "ed87a9d530bb41a67537289bafcac159cb3ee28460e0a4571123d2a778a6a882" dependencies = [ "clap_builder", "clap_derive", @@ -132,9 +132,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.37" +version = "4.5.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efd9466fac8543255d3b1fcad4762c5e116ffe808c8a3043d4263cd4fd4862a2" +checksum = "64f4f3f3c77c94aff3c7e9aac9a2ca1974a5adf392a8bb751e827d6d127ab966" dependencies = [ "anstream", "anstyle", @@ -144,9 +144,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.32" +version = "4.5.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09176aae279615badda0765c0c0b3f6ed53f4709118af73cf4655d85d1530cd7" +checksum = "ef4f52386a59ca4c860f7393bcf8abd8dfd91ecccc0f774635ff68e92eeef491" dependencies = [ "heck", "proc-macro2", @@ -156,15 +156,15 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.7.4" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6" +checksum = "b94f61472cee1439c0b966b47e3aca9ae07e45d070759512cd390ea2bebc6675" [[package]] name = "colorchoice" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" +checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" [[package]] name = "core-foundation-sys" @@ -239,9 +239,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.15.3" +version = "0.15.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84b26c544d002229e640969970a2e74021aadf6e2f96372b9c58eff97de08eb3" +checksum = "5971ac85611da7067dbfcabef3c70ebb5606018acd9e2a3903a0da507521e0d5" [[package]] name = "heck" @@ -251,9 +251,9 @@ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "hermit-abi" -version = "0.5.0" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbd780fe5cc30f81464441920d82ac8740e2e46b29a6fad543ddd075229ce37e" +checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" [[package]] name = "hostname" @@ -292,9 +292,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.9.0" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cea70ddb795996207ad57735b50c5982d8844f38ba9ee5f1aedcfb708a2aa11e" +checksum = "fe4cd85333e22411419a0bcae1297d25e58c9443848b11dc6a86fefe8c78a661" dependencies = [ "equivalent", "hashbrown", @@ -341,15 +341,15 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.172" +version = "0.2.174" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d750af042f7ef4f724306de029d18836c26c1765a54a6a3f094cbd23a7267ffa" +checksum = "1171693293099992e19cddea4e8b849964e9846f4acee11b3948bcc337be8776" [[package]] name = "libredox" -version = "0.1.3" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" +checksum = "391290121bad3d37fbddad76d8f5d1c1c314cfc646d143d7e07a3086ddff0ce3" dependencies = [ "bitflags", "libc", @@ -363,15 +363,15 @@ checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" [[package]] name = "md5" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "490cc448043f947bae3cbee9c203358d62dbee0db12107a74be5c30ccfd09771" +checksum = "ae960838283323069879657ca3de837e9f7bbb4c7bf6ea7f1b290d5e9476d2e0" [[package]] name = "memchr" -version = "2.7.4" +version = "2.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" +checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0" [[package]] name = "num-traits" @@ -388,6 +388,12 @@ version = "1.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" +[[package]] +name = "once_cell_polyfill" +version = "1.70.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4895175b425cb1f87721b59f0f286c2092bd4af812243672510e1ac53e2e0ad" + [[package]] name = "pkg-config" version = "0.3.32" @@ -454,9 +460,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.20" +version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eded382c5f5f786b989652c49544c4877d9f015cc22e145a5ea8ea66c2921cd2" +checksum = "8a0d197bd2c9dc6e53b84da9556a69ba4cdfab8619eb41a8bd1cc2027a0f6b1d" [[package]] name = "ryu" @@ -486,9 +492,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.8" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" +checksum = "40734c41988f7306bb04f0ecf60ec0f3f1caa34290e4e8ea471dcd3346483b83" dependencies = [ "serde", ] @@ -535,9 +541,9 @@ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "syn" -version = "2.0.101" +version = "2.0.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce2b7fc941b3a24138a0a7cf8e858bfc6a992e7978a068a5c760deb0ed43caf" +checksum = "17b6f705963418cdb9927482fa304bc562ece2fdd4f616084c50b7023b435a40" dependencies = [ "proc-macro2", "quote", @@ -577,44 +583,42 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.22" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05ae329d1f08c4d17a59bed7ff5b5a769d062e64a62d34a3261b219e62cd5aae" -dependencies = [ - "serde", - "serde_spanned", - "toml_datetime", - "toml_edit", -] - -[[package]] -name = "toml_datetime" -version = "0.6.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3da5db5a963e24bc68be8b17b6fa82814bb22ee8660f192bb182771d498f09a3" -dependencies = [ - "serde", -] - -[[package]] -name = "toml_edit" -version = "0.22.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "310068873db2c5b3e7659d2cc35d21855dbafa50d1ce336397c666e3cb08137e" +checksum = "41ae868b5a0f67631c14589f7e250c1ea2c574ee5ba21c6c8dd4b1485705a5a1" dependencies = [ "indexmap", "serde", "serde_spanned", "toml_datetime", - "toml_write", + "toml_parser", + "toml_writer", "winnow", ] [[package]] -name = "toml_write" -version = "0.1.1" +name = "toml_datetime" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfb942dfe1d8e29a7ee7fcbde5bd2b9a25fb89aa70caea2eba3bee836ff41076" +checksum = "bade1c3e902f58d73d3f294cd7f20391c1cb2fbcb643b73566bc773971df91e3" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_parser" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97200572db069e74c512a14117b296ba0a80a30123fbbb5aa1f4a348f639ca30" +dependencies = [ + "winnow", +] + +[[package]] +name = "toml_writer" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc842091f2def52017664b53082ecbbeb5c7731092bad69d2c63050401dfd64" [[package]] name = "unicode-ident" @@ -636,9 +640,9 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" +version = "0.11.1+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" [[package]] name = "wasm-bindgen" @@ -722,9 +726,9 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows-core" -version = "0.61.0" +version = "0.61.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4763c1de310c86d75a878046489e2e5ba02c649d185f21c67d4cf8a56d098980" +checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" dependencies = [ "windows-implement", "windows-interface", @@ -757,24 +761,24 @@ dependencies = [ [[package]] name = "windows-link" -version = "0.1.1" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76840935b766e1b0a05c0066835fb9ec80071d4c09a16f6bd5f7e655e3c14c38" +checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" [[package]] name = "windows-result" -version = "0.3.2" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c64fd11a4fd95df68efcfee5f44a294fe71b8bc6a91993e2791938abcc712252" +checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" dependencies = [ "windows-link", ] [[package]] name = "windows-strings" -version = "0.4.0" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a2ba9642430ee452d5a7aa78d72907ebe8cfda358e8cb7918a2050581322f97" +checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" dependencies = [ "windows-link", ] @@ -854,9 +858,6 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.7.9" +version = "0.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9fb597c990f03753e08d3c29efbfcf2019a003b4bf4ba19225c158e1549f0f3" -dependencies = [ - "memchr", -] +checksum = "f3edebf492c8125044983378ecb5766203ad3b4c2f7a922bd7dd207f6d443e95" diff --git a/Cargo.toml b/Cargo.toml index ba0dc9d..d2f2b93 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,12 +8,12 @@ description = "Simple and handy btrfs snapshoting tool." # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -clap = { version = "4.5.37", features = ["derive", "env"] } +clap = { version = "4.5.42", features = ["derive", "env"] } serde = { version = "1.0.219", features = ["derive"] } sqlite = "0.37.0" -md5 = "0.7.0" +md5 = "0.8.0" chrono = "0.4.41" prettytable-rs = "0.10.0" anyhow = "1.0.98" -toml = "0.8.22" +toml = "0.9.4" hostname = "0.4.1" From daca0998fa5e6061fc5d028f503e3b018284e3ce Mon Sep 17 00:00:00 2001 From: Eduard Tolosa Date: Sun, 10 Aug 2025 01:20:50 -0500 Subject: [PATCH 28/31] (chore): change default for database file It's more common that people uses @snapshots (/.snapshopts/) subvolume to store snapshots, so let's default to that dir --- src/args.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/args.rs b/src/args.rs index 62fe50d..f9086d4 100644 --- a/src/args.rs +++ b/src/args.rs @@ -28,7 +28,7 @@ pub struct Args { short = 'd', long = "dfile", env = "RUSNAPSHOT_DB_FILE", - default_value = "/.rusnapshot/rusnapshot.db" + default_value = "/.snapshots/rustnapshot.sqlite" )] pub database_file: String, /// Prefix for the snapshot name. From 2f47feccd737d8eb15becae59e0ee62276f96f4e Mon Sep 17 00:00:00 2001 From: Eduard Tolosa Date: Sun, 10 Aug 2025 01:21:03 -0500 Subject: [PATCH 29/31] (chore): bump version and update deps --- Cargo.lock | 140 ++++++++++++++++++++++++++++++++++++++++------------- Cargo.toml | 12 +++-- 2 files changed, 116 insertions(+), 36 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index fc2dd27..6732b15 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -19,9 +19,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.19" +version = "0.6.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "301af1932e46185686725e0fad2f8f2aa7da69dd70bf6ecc44d6b703844a3933" +checksum = "3ae563653d1938f79b1ab1b5e668c87c76a9930414574a6583a7b7e11a8e6192" dependencies = [ "anstyle", "anstyle-parse", @@ -49,22 +49,22 @@ dependencies = [ [[package]] name = "anstyle-query" -version = "1.1.3" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8bdeb6047d8983be085bab0ba1472e6dc604e7041dbf6fcd5e71523014fae9" +checksum = "9e231f6134f61b71076a3eab506c379d4f36122f2af15a9ff04415ea4c3339e2" dependencies = [ - "windows-sys", + "windows-sys 0.60.2", ] [[package]] name = "anstyle-wincon" -version = "3.0.9" +version = "3.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "403f75924867bb1033c59fbf0797484329750cfbe3c4325cd33127941fabc882" +checksum = "3e0633414522a32ffaac8ac6cc8f748e090c5717661fddeea04219e2344f5f2a" dependencies = [ "anstyle", "once_cell_polyfill", - "windows-sys", + "windows-sys 0.60.2", ] [[package]] @@ -93,9 +93,9 @@ checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" [[package]] name = "cc" -version = "1.2.31" +version = "1.2.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3a42d84bb6b69d3a8b3eaacf0d88f179e1929695e1ad012b6cf64d9caaa5fd2" +checksum = "2352e5597e9c544d5e6d9c95190d5d27738ade584fa8db0a16e130e5c2b5296e" dependencies = [ "shlex", ] @@ -122,9 +122,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.42" +version = "4.5.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed87a9d530bb41a67537289bafcac159cb3ee28460e0a4571123d2a778a6a882" +checksum = "50fd97c9dc2399518aa331917ac6f274280ec5eb34e555dd291899745c48ec6f" dependencies = [ "clap_builder", "clap_derive", @@ -132,9 +132,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.42" +version = "4.5.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64f4f3f3c77c94aff3c7e9aac9a2ca1974a5adf392a8bb751e827d6d127ab966" +checksum = "c35b5830294e1fa0462034af85cc95225a4cb07092c088c55bda3147cfcd8f65" dependencies = [ "anstream", "anstyle", @@ -239,9 +239,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.15.4" +version = "0.15.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5971ac85611da7067dbfcabef3c70ebb5606018acd9e2a3903a0da507521e0d5" +checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" [[package]] name = "heck" @@ -308,7 +308,7 @@ checksum = "e04d7f318608d35d4b61ddd75cbdaee86b023ebe2bd5a66ee0915f0bf93095a9" dependencies = [ "hermit-abi", "libc", - "windows-sys", + "windows-sys 0.59.0", ] [[package]] @@ -445,7 +445,7 @@ dependencies = [ [[package]] name = "rusnapshot" -version = "0.5.2" +version = "0.5.3" dependencies = [ "anyhow", "chrono", @@ -460,9 +460,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.21" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a0d197bd2c9dc6e53b84da9556a69ba4cdfab8619eb41a8bd1cc2027a0f6b1d" +checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" [[package]] name = "ryu" @@ -583,9 +583,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41ae868b5a0f67631c14589f7e250c1ea2c574ee5ba21c6c8dd4b1485705a5a1" +checksum = "75129e1dc5000bfbaa9fee9d1b21f974f9fbad9daec557a521ee6e080825f6e8" dependencies = [ "indexmap", "serde", @@ -607,9 +607,9 @@ dependencies = [ [[package]] name = "toml_parser" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97200572db069e74c512a14117b296ba0a80a30123fbbb5aa1f4a348f639ca30" +checksum = "b551886f449aa90d4fe2bdaa9f4a2577ad2dde302c61ecf262d80b116db95c10" dependencies = [ "winnow", ] @@ -789,7 +789,16 @@ version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" dependencies = [ - "windows-targets", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" +dependencies = [ + "windows-targets 0.53.3", ] [[package]] @@ -798,14 +807,31 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_gnullvm", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm 0.52.6", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", +] + +[[package]] +name = "windows-targets" +version = "0.53.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5fe6031c4041849d7c496a8ded650796e7b6ecc19df1a431c1a363342e5dc91" +dependencies = [ + "windows-link", + "windows_aarch64_gnullvm 0.53.0", + "windows_aarch64_msvc 0.53.0", + "windows_i686_gnu 0.53.0", + "windows_i686_gnullvm 0.53.0", + "windows_i686_msvc 0.53.0", + "windows_x86_64_gnu 0.53.0", + "windows_x86_64_gnullvm 0.53.0", + "windows_x86_64_msvc 0.53.0", ] [[package]] @@ -814,48 +840,96 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" + [[package]] name = "windows_aarch64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" + [[package]] name = "windows_i686_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" +[[package]] +name = "windows_i686_gnu" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3" + [[package]] name = "windows_i686_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" + [[package]] name = "windows_i686_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" +[[package]] +name = "windows_i686_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" + [[package]] name = "windows_x86_64_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" + [[package]] name = "windows_x86_64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" + [[package]] name = "windows_x86_64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" +[[package]] +name = "windows_x86_64_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" + [[package]] name = "winnow" version = "0.7.12" diff --git a/Cargo.toml b/Cargo.toml index d2f2b93..a974ef2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rusnapshot" -version = "0.5.2" +version = "0.5.3" authors = ["edu4rdshl"] edition = "2024" description = "Simple and handy btrfs snapshoting tool." @@ -8,12 +8,18 @@ description = "Simple and handy btrfs snapshoting tool." # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -clap = { version = "4.5.42", features = ["derive", "env"] } +clap = { version = "4.5.43", features = ["derive", "env"] } serde = { version = "1.0.219", features = ["derive"] } sqlite = "0.37.0" md5 = "0.8.0" chrono = "0.4.41" prettytable-rs = "0.10.0" anyhow = "1.0.98" -toml = "0.9.4" +toml = "0.9.5" hostname = "0.4.1" + +[profile.release] +lto = true +codegen-units = 1 +panic = 'abort' +strip = true From a2de007c870370bbaa6155a9b6a1fcfbc4ebfe5e Mon Sep 17 00:00:00 2001 From: Eduard Tolosa Date: Mon, 8 Sep 2025 11:54:31 -0500 Subject: [PATCH 30/31] (chore): fix systemd units - Best wording - Don't allow to enable `.service` units, that wouldn't make sense because they're managed by timers --- examples/services/rusnapshot-daily.service | 2 +- examples/services/rusnapshot-daily.timer | 2 +- examples/services/rusnapshot-monthly.service | 5 +---- examples/services/rusnapshot-monthly.timer | 2 +- examples/services/rusnapshot-weekly.service | 5 +---- examples/services/rusnapshot-weekly.timer | 2 +- 6 files changed, 6 insertions(+), 12 deletions(-) diff --git a/examples/services/rusnapshot-daily.service b/examples/services/rusnapshot-daily.service index f077e1c..51639da 100644 --- a/examples/services/rusnapshot-daily.service +++ b/examples/services/rusnapshot-daily.service @@ -1,5 +1,5 @@ [Unit] -Description=Snapshot root directory. +Description=Daily snapshots for home and root subvolumes [Service] Type=oneshot diff --git a/examples/services/rusnapshot-daily.timer b/examples/services/rusnapshot-daily.timer index 81f1abd..98f2641 100644 --- a/examples/services/rusnapshot-daily.timer +++ b/examples/services/rusnapshot-daily.timer @@ -1,5 +1,5 @@ [Unit] -Description=Take snapshots daily. +Description=Take daily snapshots with rusnapshot [Timer] OnCalendar=daily diff --git a/examples/services/rusnapshot-monthly.service b/examples/services/rusnapshot-monthly.service index 71ce7c8..5478ce5 100644 --- a/examples/services/rusnapshot-monthly.service +++ b/examples/services/rusnapshot-monthly.service @@ -1,5 +1,5 @@ [Unit] -Description=Take system snapshots monthly. +Description=Monthly snapshots for home and root subvolumes [Service] Type=oneshot @@ -7,6 +7,3 @@ ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-root.toml --create --kin ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-root.toml --clean --kind monthly ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-home.toml --create --kind monthly ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-home.toml --clean --kind monthly - -[Install] -WantedBy=default.target \ No newline at end of file diff --git a/examples/services/rusnapshot-monthly.timer b/examples/services/rusnapshot-monthly.timer index 88eb6fd..366608b 100644 --- a/examples/services/rusnapshot-monthly.timer +++ b/examples/services/rusnapshot-monthly.timer @@ -1,5 +1,5 @@ [Unit] -Description=Take system snapshots monthly. +Description=Take monthly snapshots with rusnapshot [Timer] OnCalendar=monthly diff --git a/examples/services/rusnapshot-weekly.service b/examples/services/rusnapshot-weekly.service index 155ba82..ba4db04 100644 --- a/examples/services/rusnapshot-weekly.service +++ b/examples/services/rusnapshot-weekly.service @@ -1,5 +1,5 @@ [Unit] -Description=Take system snapshots weekly. +Description=Weekly snapshots for home and root subvolumes [Service] Type=oneshot @@ -7,6 +7,3 @@ ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-root.toml --create --kin ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-root.toml --clean --kind weekly ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-home.toml --create --kind weekly ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-home.toml --clean --kind weekly - -[Install] -WantedBy=default.target \ No newline at end of file diff --git a/examples/services/rusnapshot-weekly.timer b/examples/services/rusnapshot-weekly.timer index 8126e47..219cbf2 100644 --- a/examples/services/rusnapshot-weekly.timer +++ b/examples/services/rusnapshot-weekly.timer @@ -1,5 +1,5 @@ [Unit] -Description=Take system snapshots weekly. +Description=Take weekly snapshots with rusnapshot [Timer] OnCalendar=weekly From 1351a6bd9b556de4b905ca88dedd97e023cad6f0 Mon Sep 17 00:00:00 2001 From: Eduard Tolosa Date: Mon, 8 Sep 2025 19:12:53 -0500 Subject: [PATCH 31/31] (chore): update dependencies --- Cargo.lock | 113 ++++++++++++++++++++++++++++------------------------- Cargo.toml | 6 +-- 2 files changed, 63 insertions(+), 56 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6732b15..e768aa9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,12 +2,6 @@ # It is not intended for manual editing. version = 4 -[[package]] -name = "android-tzdata" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" - [[package]] name = "android_system_properties" version = "0.1.5" @@ -69,9 +63,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.98" +version = "1.0.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487" +checksum = "b0674a1ddeecb70197781e945de4b3b8ffb61fa939a5597bcf48503737663100" [[package]] name = "autocfg" @@ -81,9 +75,9 @@ checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" [[package]] name = "bitflags" -version = "2.9.1" +version = "2.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967" +checksum = "2261d10cca569e4643e526d8dc2e62e433cc8aba21ab764233731f8d369bf394" [[package]] name = "bumpalo" @@ -93,38 +87,38 @@ checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" [[package]] name = "cc" -version = "1.2.32" +version = "1.2.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2352e5597e9c544d5e6d9c95190d5d27738ade584fa8db0a16e130e5c2b5296e" +checksum = "5252b3d2648e5eedbc1a6f501e3c795e07025c1e93bbf8bbdd6eef7f447a6d54" dependencies = [ + "find-msvc-tools", "shlex", ] [[package]] name = "cfg-if" -version = "1.0.1" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9555578bc9e57714c812a1f84e4fc5b4d21fcb063490c624de019f7464c91268" +checksum = "2fd1289c04a9ea8cb22300a459a72a385d7c73d3259e2ed7dcb2af674838cfa9" [[package]] name = "chrono" -version = "0.4.41" +version = "0.4.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c469d952047f47f91b68d1cba3f10d63c11d73e4636f24f08daf0278abf01c4d" +checksum = "145052bdd345b87320e369255277e3fb5152762ad123a901ef5c262dd38fe8d2" dependencies = [ - "android-tzdata", "iana-time-zone", "js-sys", "num-traits", "wasm-bindgen", - "windows-link", + "windows-link 0.2.0", ] [[package]] name = "clap" -version = "4.5.43" +version = "4.5.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50fd97c9dc2399518aa331917ac6f274280ec5eb34e555dd291899745c48ec6f" +checksum = "7eac00902d9d136acd712710d71823fb8ac8004ca445a89e73a41d45aa712931" dependencies = [ "clap_builder", "clap_derive", @@ -132,9 +126,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.43" +version = "4.5.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c35b5830294e1fa0462034af85cc95225a4cb07092c088c55bda3147cfcd8f65" +checksum = "2ad9bbf750e73b5884fb8a211a9424a1906c1e156724260fdae972f31d70e1d6" dependencies = [ "anstream", "anstyle", @@ -144,9 +138,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.41" +version = "4.5.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef4f52386a59ca4c860f7393bcf8abd8dfd91ecccc0f774635ff68e92eeef491" +checksum = "bbfd7eae0b0f1a6e63d4b13c9c478de77c2eb546fba158ad50b4203dc24b9f9c" dependencies = [ "heck", "proc-macro2", @@ -226,6 +220,12 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" +[[package]] +name = "find-msvc-tools" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fd99930f64d146689264c637b5af2f0233a933bef0d8570e2526bf9e083192d" + [[package]] name = "getrandom" version = "0.2.16" @@ -263,7 +263,7 @@ checksum = "a56f203cd1c76362b69e3863fd987520ac36cf70a8c92627449b2f64a8cf7d65" dependencies = [ "cfg-if", "libc", - "windows-link", + "windows-link 0.1.3", ] [[package]] @@ -292,9 +292,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.10.0" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe4cd85333e22411419a0bcae1297d25e58c9443848b11dc6a86fefe8c78a661" +checksum = "f2481980430f9f78649238835720ddccc57e52df14ffce1c6f37391d61b563e9" dependencies = [ "equivalent", "hashbrown", @@ -325,9 +325,9 @@ checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" [[package]] name = "js-sys" -version = "0.3.77" +version = "0.3.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" +checksum = "0c0b063578492ceec17683ef2f8c5e89121fbd0b172cbc280635ab7567db2738" dependencies = [ "once_cell", "wasm-bindgen", @@ -341,9 +341,9 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.174" +version = "0.2.175" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1171693293099992e19cddea4e8b849964e9846f4acee11b3948bcc337be8776" +checksum = "6a82ae493e598baaea5209805c49bbf2ea7de956d50d7da0da1164f9c6d28543" [[package]] name = "libredox" @@ -357,9 +357,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.27" +version = "0.4.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" +checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432" [[package]] name = "md5" @@ -416,9 +416,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.95" +version = "1.0.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" +checksum = "89ae43fd86e4158d6db51ad8e2b80f313af9cc74f5c0e03ccb87de09998732de" dependencies = [ "unicode-ident", ] @@ -541,9 +541,9 @@ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "syn" -version = "2.0.104" +version = "2.0.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17b6f705963418cdb9927482fa304bc562ece2fdd4f616084c50b7023b435a40" +checksum = "ede7c438028d4436d71104916910f5bb611972c5cfd7f89b8300a8186e6fada6" dependencies = [ "proc-macro2", "quote", @@ -646,21 +646,22 @@ checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" [[package]] name = "wasm-bindgen" -version = "0.2.100" +version = "0.2.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" +checksum = "7e14915cadd45b529bb8d1f343c4ed0ac1de926144b746e2710f9cd05df6603b" dependencies = [ "cfg-if", "once_cell", "rustversion", "wasm-bindgen-macro", + "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.100" +version = "0.2.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" +checksum = "e28d1ba982ca7923fd01448d5c30c6864d0a14109560296a162f80f305fb93bb" dependencies = [ "bumpalo", "log", @@ -672,9 +673,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.100" +version = "0.2.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" +checksum = "7c3d463ae3eff775b0c45df9da45d68837702ac35af998361e2c84e7c5ec1b0d" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -682,9 +683,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.100" +version = "0.2.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" +checksum = "7bb4ce89b08211f923caf51d527662b75bdc9c9c7aab40f86dcb9fb85ac552aa" dependencies = [ "proc-macro2", "quote", @@ -695,9 +696,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.100" +version = "0.2.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" +checksum = "f143854a3b13752c6950862c906306adb27c7e839f7414cec8fea35beab624c1" dependencies = [ "unicode-ident", ] @@ -732,7 +733,7 @@ checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" dependencies = [ "windows-implement", "windows-interface", - "windows-link", + "windows-link 0.1.3", "windows-result", "windows-strings", ] @@ -765,13 +766,19 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" +[[package]] +name = "windows-link" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45e46c0661abb7180e7b9c281db115305d49ca1709ab8242adf09666d2173c65" + [[package]] name = "windows-result" version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" dependencies = [ - "windows-link", + "windows-link 0.1.3", ] [[package]] @@ -780,7 +787,7 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" dependencies = [ - "windows-link", + "windows-link 0.1.3", ] [[package]] @@ -823,7 +830,7 @@ version = "0.53.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d5fe6031c4041849d7c496a8ded650796e7b6ecc19df1a431c1a363342e5dc91" dependencies = [ - "windows-link", + "windows-link 0.1.3", "windows_aarch64_gnullvm 0.53.0", "windows_aarch64_msvc 0.53.0", "windows_i686_gnu 0.53.0", @@ -932,6 +939,6 @@ checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" [[package]] name = "winnow" -version = "0.7.12" +version = "0.7.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3edebf492c8125044983378ecb5766203ad3b4c2f7a922bd7dd207f6d443e95" +checksum = "21a0236b59786fed61e2a80582dd500fe61f18b5dca67a4a067d0bc9039339cf" diff --git a/Cargo.toml b/Cargo.toml index a974ef2..513c773 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,13 +8,13 @@ description = "Simple and handy btrfs snapshoting tool." # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -clap = { version = "4.5.43", features = ["derive", "env"] } +clap = { version = "4.5.47", features = ["derive", "env"] } serde = { version = "1.0.219", features = ["derive"] } sqlite = "0.37.0" md5 = "0.8.0" -chrono = "0.4.41" +chrono = "0.4.42" prettytable-rs = "0.10.0" -anyhow = "1.0.98" +anyhow = "1.0.99" toml = "0.9.5" hostname = "0.4.1"