/go/cf ("copy files") copies everything inside a source folder into a destination folder. It uses rsync, so: The destination can be another folder on this server, or a folder on a remote server. Every admin action in GoAdmio has a matching /go/ command, so anything you can click you can also script.
Quick start
# Copy a folder's contents into another folder on this server
/go/cf /home/example.com/www /backup/example.com
# Copy a folder's contents to a remote server
/go/cf /home/example.com/www /home/example.com/www 203.0.113.10 'RemoteRootPassword'
Options
| Form | Arguments | What it does |
|---|---|---|
| Local copy | 2 | Copies the contents of <from> into <to> on this server. Both folders must already exist. |
| Remote copy | Exactly 4 | Copies the contents of <from> into <to> on the remote server, as root, over SSH. |
Rules
| Item | Rule |
|---|---|
| Paths for a local copy | Both must contain a /. Otherwise the command does nothing. |
| Remote copy arguments | Exactly four. The SSH port is always 22 (see Known issues). |
| Deleted files | Files removed from <from> are not removed from <to>. |
| Spaces in paths | Not supported. |
Examples
# Local copy
/go/cf /home/example.com/www /backup/example.com
# Remote copy
/go/cf /var/skeleton /var/skeleton 203.0.113.10 'RemoteRootPassword'
# Check the result on the remote server
ssh root@203.0.113.10 'ls -la /var/skeleton'
Output
| Message | Meaning |
|---|---|
Transferring files from <from>/ to <to>/... |
A remote copy started. |
<folder> Folder not exists. |
The source folder (or, for a local copy, the destination) does not exist. |
Neither form prints a list of files or a final message. A local copy is completely silent unless rsync reports an error. Each run adds a line to /var/log/go/cf.log (see Security).
See the full reference at /go/cf and the GoAdmio command index.
GoAdmio is free and open source, with no license fees and no account limits. Read the GoAdmio docs, or see why it is a free cPanel alternative at goadmio.com.
