Folder import
clouduler folder-import gets a file or folder that already exists on a node into a drive volume, then pushes it to every other node holding a copy right away. Use it to load an existing photo library, dataset or database dump into Clouduler without waiting for the next scheduled sync. It is a CLI command; the web UI has no equivalent.
How it works
- The command runs on a node that implements the target drive. For a replicated drive that is any node holding it. For a served drive it is the active server or a node that mounts it. A standby candidate is refused, because the next sync from the real server would erase what you wrote.
- It places the source into
<drive>/<volume>(or a sub-path inside it) as a copy, move or link. - It records the volume in the cluster and marks this node as primary, then pushes the data to the peers immediately instead of waiting for the sync timer.
Import a folder
Run it with enough privileges to write the drive folder (usually sudo). The CLI does not check for root and does not change ownership: copied and moved files keep your user's ownership, and that replicates to the other nodes.
# Copy (the default)
sudo clouduler folder-import ~/Downloads/dataset bulk/imports
# Move instead of copy (falls back to copy + delete across filesystems)
sudo clouduler folder-import -m /mnt/usb/photos bulk/photos
# Symlink instead of duplicating
sudo clouduler folder-import -l /mnt/usb/photos bulk/photos
# Put the source inside a sub-path of the volume
sudo clouduler folder-import ~/notes.txt bulk/docs/inbox
The target is <drive>/<volume>[/path inside volume]. Without -r, the source lands inside the volume (a folder keeps its name).
Replace a whole volume
-r replaces the entire volume with the source. It takes no sub-path: the target must be exactly drive/volume.
sudo clouduler folder-import -r -f ./restored-db fast/postgres
Without -f, -r refuses to touch a volume that is in use. With -f, Clouduler stops the instances that mount the volume, clears it, imports, syncs, and starts them again.
Options
flagdefault onflagdefault offflagdefault offflagdefault offflagdefault offnode namedefault hostname