1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142
| mark@Imagery:~$ sudo /usr/local/bin/charcol shell
░██████ ░██ ░██ ░██ ░░██ ░██ ░██ ░██ ░████████ ░██████ ░██░████ ░███████ ░███████ ░██ ░██ ░██ ░██ ░██ ░███ ░██ ░██ ░██ ░██ ░██ ░██ ░██ ░██ ░███████ ░██ ░██ ░██ ░██ ░██ ░██ ░██ ░██ ░██ ░██ ░██ ░██ ░██ ░██ ░██ ░██ ░██ ░██████ ░██ ░██ ░█████░██ ░██ ░███████ ░███████ ░██ Charcol The Backup Suit - Development edition 1.0.0
[2025-11-20 01:25:43] [INFO] Entering Charcol interactive shell. Type 'help' for commands, 'exit' to quit. charcol> help [2025-11-20 01:25:49] [INFO] Charcol Shell Commands:
Backup & Fetch: backup -i <paths...> [-o <output_file>] [-p <file_password>] [-c <level>] [--type <archive_type>] [-e <patterns...>] [--no-timestamp] [-f] [--skip-symlinks] [--ask-password] Purpose: Create an encrypted backup archive from specified files/directories. Output: File will have a '.aes' extension if encrypted. Defaults to '/var/backup/'. Naming: Automatically adds timestamp unless --no-timestamp is used. If no -o, uses input filename as base. Permissions: Files created with 664 permissions. Ownership is user:group. Encryption: - If '--app-password' is set (status 1) and no '-p <file_password>' is given, uses the application password for encryption. - If 'no password' mode is set (status 2) and no '-p <file_password>' is given, creates an UNENCRYPTED archive. Examples: - Encrypted with file-specific password: backup -i /home/user/my_docs /var/log/nginx/access.log -o /tmp/web_logs -p <file_password> --verbose --type tar.gz -c 9 - Encrypted with app password (if status 1): backup -i /home/user/example_file.json - Unencrypted (if status 2 and no -p): backup -i /home/user/example_file.json - No timestamp: backup -i /home/user/example_file.json --no-timestamp
fetch <url> [-o <output_file>] [-p <file_password>] [-f] [--ask-password] Purpose: Download a file from a URL, encrypt it, and save it. Output: File will have a '.aes' extension if encrypted. Defaults to '/var/backup/fetched_file'. Permissions: Files created with 664 permissions. Ownership is current user:group. Restrictions: Fetching from loopback addresses (e.g., localhost, 127.0.0.1) is blocked. Encryption: - If '--app-password' is set (status 1) and no '-p <file_password>' is given, uses the application password for encryption. - If 'no password' mode is set (status 2) and no '-p <file_password>' is given, creates an UNENCRYPTED file. Examples: - Encrypted: fetch <URL> -o <output_file_path> -p <file_password> --force - Unencrypted (if status 2 and no -p): fetch <URL> -o <output_file_path>
Integrity & Extraction: list <encrypted_file> [-p <file_password>] [--ask-password] Purpose: Decrypt and list contents of an encrypted Charcol archive. Note: Requires the correct decryption password. Supported Types: .zip.aes, .tar.gz.aes, .tar.bz2.aes. Example: list /var/backup/<encrypted_file_name>.zip.aes -p <file_password>
check <encrypted_file> [-p <file_password>] [--ask-password] Purpose: Decrypt and verify the structural integrity of an encrypted Charcol archive. Note: Requires the correct decryption password. This checks the archive format, not internal data consistency. Supported Types: .zip.aes, .tar.gz.aes, .tar.bz2.aes. Example: check /var/backup/<encrypted_file_name>.tar.gz.aes -p <file_password>
extract <encrypted_file> <output_directory> [-p <file_password>] [--ask-password] Purpose: Decrypt an encrypted Charcol archive and extract its contents. Note: Requires the correct decryption password. Example: extract /var/backup/<encrypted_file_name>.zip.aes /tmp/restored_data -p <file_password>
Automated Jobs (Cron): auto add --schedule "<cron_schedule>" --command "<shell_command>" --name "<job_name>" [--log-output <log_file>] Purpose: Add a new automated cron job managed by Charcol. Verification: - If '--app-password' is set (status 1): Requires Charcol application password (via global --app-password flag). - If 'no password' mode is set (status 2): Requires system password verification (in interactive shell). Security Warning: Charcol does NOT validate the safety of the --command. Use absolute paths. Examples: - Status 1 (encrypted app password), cron: CHARCOL_NON_INTERACTIVE=true charcol --app-password <app_password> auto add \ --schedule "0 2 * * *" --command "charcol backup -i /home/user/docs -p <file_password>" \ --name "Daily Docs Backup" --log-output <log_file_path> - Status 2 (no app password), cron, unencrypted backup: CHARCOL_NON_INTERACTIVE=true charcol auto add \ --schedule "0 2 * * *" --command "charcol backup -i /home/user/docs" \ --name "Daily Docs Backup" --log-output <log_file_path> - Status 2 (no app password), interactive: auto add --schedule "0 2 * * *" --command "charcol backup -i /home/user/docs" \ --name "Daily Docs Backup" --log-output <log_file_path> (will prompt for system password)
auto list Purpose: List all automated jobs managed by Charcol. Example: auto list
auto edit <job_id> [--schedule "<new_schedule>"] [--command "<new_command>"] [--name "<new_name>"] [--log-output <new_log_file>] Purpose: Modify an existing Charcol-managed automated job. Verification: Same as 'auto add'. Example: auto edit <job_id> --schedule "30 4 * * *" --name "Updated Backup Job"
auto delete <job_id> Purpose: Remove an automated job managed by Charcol. Verification: Same as 'auto add'. Example: auto delete <job_id>
Shell & Help: shell Purpose: Enter this interactive Charcol shell. Example: shell
exit Purpose: Exit the Charcol shell. Example: exit
clear Purpose: Clear the interactive shell screen. Example: clear
help [command] Purpose: Show help for Charcol or a specific command. Example: help backup
Global Flags (apply to all commands unless overridden): --app-password <password> : Provide the Charcol *application password* directly. Required for 'auto' commands if status 1. Less secure than interactive prompt. -p, "--password" <password> : Provide the *file encryption/decryption password* directly. Overrides application password for file operations. Less secure than --ask-password. -v, "--verbose" : Enable verbose output. --quiet : Suppress informational output (show only warnings and errors). --log-file <path> : Log all output to a specified file. --dry-run : Simulate actions without actual file changes (for 'backup' and 'fetch'). --ask-password : Prompt for the *file encryption/decryption password* securely. Overrides -p and application password for file operations. --no-banner : Do not display the ASCII banner. -R, "--reset-password-to-default" : Reset application password to default (requires system password verification).
|