DiskPush drives rsync and SSH rather than reimplementing them, so both need to exist:
- On this machine:
rsyncand an SSH client. - On any server you transfer to or from:
rsync.
# Debian / Ubuntu
sudo apt install rsync openssh-clientLinux is the reference platform. macOS works; its system rsync is old enough
that a Homebrew rsync is worth having for zstd compression and --mkpath.
Nothing needs to be configured to move files between two local paths, which is a good way to see the defaults work:
diskpush ./photos/ /mnt/backup/photos/Run it twice. The second run transfers nothing, because nothing changed. That is the whole idea.
diskpush connections add production deploy@example.com --port 22 --path /srv/appOr import what you already have:
diskpush connections importThen check it end to end:
diskpush connections test productionSSH ok deploy@example.com:22
SFTP browsing ok available
Remote rsync ok 3.2.7
zstd compression ok supported
ACL preservation ok supported
xattr preservation ok supported
Home directory ok /home/deploy
The first connection to a host shows its fingerprint and asks once. After that the key is remembered, and a change to it blocks the connection rather than asking again.
This command also records what that server's rsync can do, so later transfers gate options on the remote's real capabilities instead of assuming yours apply to both ends.
diskpush ls production:/srv/app
diskpush ./dist/ production:/srv/app/ --dry-runThe dry run prints the change set: what would be added, updated, and left alone. Nothing moves.
diskpush ./dist/ production:/srv/app/To see exactly what is being run, at any time:
diskpush ./dist/ production:/srv/app/ --print-argsdiskpush ./site/ production:/var/www/site/ \
--exclude-preset node \
--exclude-preset git \
--exclude 'private/'diskpush profiles save website ./site/ production:/var/www/site/ \
--exclude-preset node --exclude-preset git
diskpush profile run websiteProfiles are shared with the desktop app: one saved here shows up there.
sync never deletes. When you do want the destination to match the source
exactly, that is mirror, and it will show you the list first:
diskpush mirror ./site/ production:/var/www/site/Action Files
--------- -----
Add 12
Update 3
Unchanged 8442
Delete 87
These destination files would be deleted:
old/2019-promo.html
...
Delete 87 files at the destination? [y/N]
In a script, --yes confirms and --non-interactive guarantees it will exit
66 rather than wait for someone who is not there.
diskpush media-01:/srv/media/ backup-02:/data/media/The files move directly between those two servers. See direct-server-to-server.md.
An interrupted transfer is reported as resumable, not failed. Re-run the same command; rsync picks up from the partial file:
diskpush jobs
diskpush ./big-media/ backup-02:/data/media/ # continues