Rsync
Initial Setup
Rsync is a very robust CLI tool that provides fast incremental file transfer with many features:
- Checksum verification
- Automation via Bash script
- Resume broken transfer
- Preinstalled on Most Linux/Unix Systems
Pulling files from your slot using Rsync
Given the fact Rsync is included on Most if not all modern Distros, It is simple to begin pulling files from your Ultra.cc slot.
- First login via SSH to the machine you plan on storing the pulled files.
- Execute the below command.
- Replace
username
andserver
to reflect the details of the server you are pulling files from.
rsync -aHAXxv --numeric-ids --info=progress2 --bwlimit=20000 username@server.usbx.me:/home/username/download/ /home/targetusername/path/to/save/to
- Rsync will now ask you if your hostkey is correct, If this is your first time connecting this is totally normal type
yes
and hit ENTER. - This will now prompt you for your Ultra.cc SSH Password.
Argument | Effect |
-a | Tells rsync to recursively copy everything |
-H | This tells rsync to look for hard-linked files in the source and link together the matching files on the target |
-A | Tells Rsync to keep permissions the same on target |
-X | Tells Rsync to keep any file attributes the same on target |
-x | Tells Rsync to avoid copying Mounts and fuse based filesystem |
-v | show all output |
--bwlimit=20000 | Apply a Bandwidth limit of 20 Megabytes |
user@server.usbx.me | Fill this with your Ultra.cc Username and Server address |
Uploading files to your slot using Rsync
Uploading to your slot is just as simple as downloading from your slot to a new location.
- Login to your Ultra.cc service via SSH.
rsync -aHAXxv --numeric-ids --info=progress2 --bwlimit=20000 -e "ssh -p portnumberhere" username@remoteip:/home/remoteusername/ ~/Rsyncdrop
- Please note
portnumberhere
this is added so if your target machine is using an ssh port that is not the standard 22 you can insert it here, otherwise please enter 22 in its place. - Like when pulling files from your Ultra.cc slot, you will be prompted to confirm your hostkey and remote machines SSH Password.
Clone a complete userspace
We recommend running a screen session if you are copying a large directory structure.
- Login to the destination service via SSH.
- Create a screen session called
usercopy
.
screen -S usercopy
- Execute the below command.
- Make sure to replace
portnumberhere
with22
or whichever port your remote server uses for SSH.
rsync -aHAXxv --numeric-ids --info=progress2 --bwlimit=20000 -e "ssh -p portnumberhere" username@host:/home/remoteusername usercopy
- Press
CTRL A+D
to detach from the screen session and leave it running in the background. - You can reattach to the screen session with
screen -rd usercopy
This will place all of your remote server’s /home/username
directory to a folder called usercopy
on your destination server.
If you require further assistance, you can open a support ticket here!
Feedback and suggestions regarding this article are welcome on our Discord server