Rsync
Introduction
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
Pull Files from your Service with 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 host key is correct, If this is your first time connecting this is totally normal type
yes
and hitENTER
. - This will now prompt you for your Ultra.cc SSH Password.
Argument | Effect |
-a | Recursively copy everything |
-H | Match hardlinked files from source to target |
-A | Keep permissions the same on target |
-X | Keep any file attributes the same on target |
-x | 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 |
Upload Files to your Service with Rsync
Uploading to your service is just as simple as downloading from your service to a new location.
- Connect to your Ultra 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 service, you will be prompted to confirm your host key and remote machines SSH Password.
Clone a Complete Userspace
This will place all of your remote server’s /home/username
directory to a folder called usercopy
on your destination server. We recommend running a screen session if you are copying a large directory structure.
- Connect 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
andd
to detach from the screen session and leave it running in the background. - You can reattach to the screen session with
screen -rd usercopy
If you require further assistance, you can open a support ticket here!
Feedback and suggestions regarding this article are welcome on our Discord server