MCPcopy Index your code
hub / github.com/cookiengineer/pacman-backup

github.com/cookiengineer/pacman-backup @2.0.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release 2.0.1 ↗ · + Follow
207 symbols 457 edges 49 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Pacman Backup

Offline Pacman Cache management tool that allows off-the-grid updates via sneakernet (usb drives) or mesh Wi-Fi networks.

Share Updates via USB Drive

In the below example, make sure that usb-drive is writable. Replace the path with the correct one that points to your mounted USB drive.

Step 1: On the machine with internet connection, insert and mount the USB drive.

# Machine with internet connection
pacman-backup download /run/media/$USER/usb-drive;
pacman-backup cleanup /run/media/$USER/usb-drive;
sync;

# Unmount the USB drive and sneak/walk to other machine

Step 2: On the machine without internet connection, insert and mount the USB drive.

# Machine without internet connection
pacman-backup upgrade /run/media/$USER/usb-drive;

Share Updates via Wi-Fi Mesh Network

In the below example, the machine with internet connection has the IP 192.168.0.10. Replace the IP with the correct one that matches your setup. If in doubt, use ip or ifconfig.

Step 1: On the machine with internet connection, download all updates and serve them as local pacman archive mirror.

# Machine with internet connection
sudo pacman-backup download;
pacman-backup serve;

Step 2: On the machine without direct internet connection, download updates from the local pacman archive mirror.

# Machine without internet connection
sudo pacman-backup download http://192.168.0.10:15678/;
sudo pacman-backup upgrade;

Manual Export and Import of Database Files and Package Cache

If you don't trust automated upgrades and want to use pacman directly, that's fine. You can do so by using export on the machine with internet connection and import on the machine without internet connection.

# Machine with internet connection
sudo pacman -Syuw;
pacman-backup export /run/media/$USER/usb-drive;
sync;

# Unmount the USB drive and sneak/walk to other machine
# Machine without internet connection
sudo pacman-backup import /run/media/$USER/usb-drive;
sync;

sudo pacman -Su;

License

GPL3

Core symbols most depended-on inside this repo

String
called by 27
source/types/Time.go
isNumber
called by 26
source/types/isNumber.go
toSeparator
called by 26
source/console/console.go
isFolder
called by 26
source/cmds/pacman-backup/main.go
makeFolder
called by 14
source/cmds/pacman-backup/main.go
NewMessage
called by 13
source/console/Message.go
sanitize
called by 12
source/console/console.go
IsValid
called by 12
source/structs/Package.go

Shape

Method 102
Function 95
Struct 10

Languages

Go100%

Modules by API surface

source/types/Datetime.go41 symbols
source/types/Version.go30 symbols
source/structs/Package.go30 symbols
source/types/Time.go17 symbols
source/matchers/Package.go13 symbols
source/pacman/Config.go7 symbols
source/cmds/pacman-backup/main.go6 symbols
source/types/Maintainer.go5 symbols
source/matchers/Unresolved.go5 symbols
source/console/console.go4 symbols
source/console/Inspect.go4 symbols
source/actions/Serve.go4 symbols

For agents

$ claude mcp add pacman-backup \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact