Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
git_borg_linker
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LBMC
Hub
git_borg_linker
Commits
d714600c
Verified
Commit
d714600c
authored
Sep 23, 2022
by
nfontrod
Browse files
Options
Downloads
Patches
Plain Diff
src/main.rs: add compact subcommand
parent
3736d053
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main.rs
+14
-0
14 additions, 0 deletions
src/main.rs
with
14 additions
and
0 deletions
src/main.rs
+
14
−
0
View file @
d714600c
use
crate
::
compact
::
Compact
;
use
crate
::
delete
::
Delete
;
use
crate
::
delete
::
Delete
;
use
crate
::
prune
::
Prune
;
use
crate
::
prune
::
Prune
;
use
clap
::{
Args
,
Parser
,
Subcommand
};
use
clap
::{
Args
,
Parser
,
Subcommand
};
mod
checkout
;
mod
checkout
;
mod
commit
;
mod
commit
;
mod
compact
;
mod
create_hooks
;
mod
create_hooks
;
mod
delete
;
mod
delete
;
mod
diff
;
mod
diff
;
...
@@ -66,6 +68,8 @@ enum Commands {
...
@@ -66,6 +68,8 @@ enum Commands {
///
///
/// You can visit:
/// You can visit:
/// https://borgbackup.readthedocs.io/en/stable/usage/delete.html for more details
/// https://borgbackup.readthedocs.io/en/stable/usage/delete.html for more details
///
/// This function don't free disk space until gblk compact is used
Delete
(
Delete
),
Delete
(
Delete
),
/// This command prunes the .borg repository. This can be used to keep only
/// This command prunes the .borg repository. This can be used to keep only
/// archive created during a given time interval
/// archive created during a given time interval
...
@@ -74,7 +78,14 @@ enum Commands {
...
@@ -74,7 +78,14 @@ enum Commands {
///
///
/// You can visit:
/// You can visit:
/// https://borgbackup.readthedocs.io/en/stable/usage/prune.html for more details
/// https://borgbackup.readthedocs.io/en/stable/usage/prune.html for more details
///
/// This function don't free disk space until gblk compact is used
Prune
(
Prune
),
Prune
(
Prune
),
/// This command frees repository space by compacting segments.
///
/// It is especially useful after deleting archives because compaction will
/// free repository space
Compact
(
Compact
),
}
}
#[derive(Debug,
Args)]
#[derive(Debug,
Args)]
...
@@ -253,5 +264,8 @@ fn main() {
...
@@ -253,5 +264,8 @@ fn main() {
Commands
::
Prune
(
my_prune
)
=>
{
Commands
::
Prune
(
my_prune
)
=>
{
prune
::
prune_launcher
(
my_prune
);
prune
::
prune_launcher
(
my_prune
);
}
}
Commands
::
Compact
(
my_compact
)
=>
{
compact
::
launch_compact
(
my_compact
);
}
}
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment