- Add SQLite database connection management with proper error handling - Implement schema for files, chunks, blobs, and snapshots tables - Create repository pattern for each database table - Add transaction support with proper rollback handling - Integrate database module with fx dependency injection - Make index path configurable via VAULTIK_INDEX_PATH env var - Add fatal error handling for database integrity issues - Update DESIGN.md to clarify file_chunks vs chunk_files distinction - Remove FinalHash from BlobInfo (blobs are content-addressable) - Add file metadata support (mtime, ctime, mode, uid, gid, symlinks)
29 lines
628 B
Go
29 lines
628 B
Go
package cli
|
|
|
|
import (
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
// NewRootCommand creates the root cobra command
|
|
func NewRootCommand() *cobra.Command {
|
|
cmd := &cobra.Command{
|
|
Use: "vaultik",
|
|
Short: "Secure incremental backup tool with asymmetric encryption",
|
|
Long: `vaultik is a secure incremental backup daemon that encrypts data using age
|
|
public keys and uploads to S3-compatible storage. No private keys are needed
|
|
on the source system.`,
|
|
SilenceUsage: true,
|
|
}
|
|
|
|
// Add subcommands
|
|
cmd.AddCommand(
|
|
NewBackupCommand(),
|
|
NewRestoreCommand(),
|
|
NewPruneCommand(),
|
|
NewVerifyCommand(),
|
|
NewFetchCommand(),
|
|
)
|
|
|
|
return cmd
|
|
}
|