New | Restoretools Pkg
restoretools pkg new --name myapp --version 2.0.1 --source /opt/myapp --output-dir /backup/packages This generates a file named myapp-2.0.1.rtpkg in /backup/packages . 1. Packaging an Installed Application with Dependencies Suppose you have a proprietary binary /usr/local/bin/custom-tool that relies on specific .so files. Run:
restoretools pkg new --name nginx-running --pid 1234 --include-open-files This is invaluable for capturing ephemeral containers or in-memory executables during an incident investigation. When analyzing a mounted forensic image ( /mnt/evidence ), maintain chain-of-custody: restoretools pkg new
restoretools pkg new [OPTIONS] --name PACKAGE_NAME --source SOURCE_PATH | Argument | Description | |----------|-------------| | --name | Unique identifier for the package (e.g., apache2_custom , libssl_1.1.1 ) | | --source | Absolute path to the directory or binary to package | Common Options | Option | Purpose | |--------|---------| | --output-dir | Destination folder for the .rtpkg file (default: current directory) | | --include-deps | Scan and embed dynamic library dependencies | | --compression | gzip , lz4 , or none (default: gzip) | | --hash-algo | sha256 , sha512 , md5 (default: sha256) | | --version | Assign a semantic version to the package | | --exclude | Pattern to exclude files (e.g., *.log , tmp/* ) | Basic Example To create a package of a custom web application located in /opt/myapp : restoretools pkg new --name myapp --version 2
if [ $? -eq 0 ]; then echo "Package created: /var/restoretools/packages/$PACKAGE_NAME-$DATE.rtpkg" else echo "Error creating package" >&2 exit 1 fi A regional bank’s incident response team used restoretools pkg new to rapidly package a compromised web server’s binaries after a breach. By including --include-deps and --hash-algo sha512 , they preserved an immutable evidence package that withstood legal scrutiny. Later, the same package allowed them to restore a clean environment to a forensic lab for further analysis. Conclusion: Why You Should Start Using restoretools pkg new Today The restoretools pkg new command is more than just a packaging utility—it’s a bridge between operational recovery and forensic rigor. Whether you are a sysadmin needing to migrate legacy apps, a forensic analyst preserving evidence, or a DevOps engineer seeking portable artifacts, mastering this tool will save you hours of manual work and provide unparalleled integrity. Run: restoretools pkg new --name nginx-running --pid 1234
In the world of digital forensics, data recovery, and system administration, the ability to create, manage, and restore software packages efficiently is critical. One tool that has gained significant traction among professionals is RestoreTools —a suite designed to simplify backup, restoration, and package management across Unix-like systems.
#!/bin/bash # auto-package.sh DATE=$(date +%Y%m%d) PACKAGE_NAME="$1" SOURCE_DIR="$2" restoretools pkg new --name "$PACKAGE_NAME" --version "$DATE" --source "$SOURCE_DIR" --include-deps --output-dir "/var/restoretools/packages" --compression lz4
restoretools pkg new --name custom-tool --source /usr/local/bin/custom-tool --include-deps --recursive-deps The --recursive-deps flag ensures nested dependencies (dependencies of dependencies) are also captured. RestoreTools can trace a live process and package its binaries plus opened files:
