Cyberduck is a file manager that supports FTP, SFTP, OpenStack Swift, and Amazon S3 protocols, making it convenient for working with cloud storage. In our Cyberduck profile, the OpenStack Swift protocol is used.
Download Cyberduck from the official website and install it.
In your bucket settings, download the Hostman profile file.
Place the profile in the profiles
directory (typically located at C:\Program Files\Cyberduck\profiles
).
Launch Cyberduck and click on Open Connection.
Select the Hostman S3 Storage profile.
Enter the connection credentials.
AccountID: enter your_hostman_login:swift
Password: enter the password from the Cyberduck tab.
Click Connect.
Once connected, you will see a list of the created buckets.
Cyberduck also offers a console version for Windows. You can install it using the Chocolatey package manager:
choco install duck
After downloading, download the Hostman profile file from the bucket settings in the control panel and place it in the C:\Program Files\Cyberduck\profiles
directory.
~/Library/Group Containers/G69SCX94XU.duck/Library/Application Support/duck/Profiles
your_hostman_login:swift
Once connected, you will see a list of the created buckets.
You can also use the console version of Cyberduck. You can install it using Homebrew.
brew install duck
For Linux, you can use a console version of Cyberduck.
echo -e "deb https://s3.amazonaws.com/repo.deb.cyberduck.io stable main" | sudo tee /etc/apt/sources.list.d/cyberduck.list > /dev/null
keyserver.ubuntu.com
:sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys FE7097963FEFBE72
sudo apt-get update
sudo apt-get install duck
mkdir -p ~/.duck/profiles
wget -O ~/.duck/profiles/hostman.cyberduckprofile https://st.hostman.com/cloud-static/hostman/hostman.cyberduckprofile
The commands follow this format:
duck <generic_option> <argument> hostman:/<bucket_name> --username <login>:swift --password <password>
Where:
<generic_option>
— an additional option, such as --verbose
or --retry
.<argument>
— a duck
utility argument. You can get the full list of arguments and options by running duck --help
.<bucket_name>
— the name of the bucket.<login>
— your Hostman account login. In the --username
parameter, you should always enter the login and swift
separated by a colon, e.g., xg60398:swift
.<password>
— the storage password which you can copy from the Cyberduck tab.Example:
duck --list hostman:/7ebe7c09-90e3e6df-c3e1-4bd2-bb6f-166b49bb32f8 --username xg60398:swift --password gUAD0KCFhsGfbV2Arfhe9y5CAA4i8tLBqNyzAUW8
To get a list of files in a bucket, use either the --list
or -l
argument:
duck --list hostman:/<bucket_name> --username <login>:swift --password <password>
To download a file to your local device, use the -d
argument:
duck -d hostman:/<bucket_name> --username <login>:swift --password <password>
Use the --edit
argument to open a file for editing, make changes, and save the updated version back to the bucket:
duck --edit hostman:/<bucket_name> --username <login>:swift --password <password>
To upload a file to storage, use --upload
:
duck --upload hostman:/<bucket_name> <local_file_name> --username <login>:swift --password <password>
To copy a file from one bucket to another, use --copy
, specifying first the current file location and then its new location in the target bucket:
duck --copy hostman:/<current_bucket_name>/<file_path> hostman:/<new_bucket_name>/<file_path> --username <login>:swift --password <password>
To regularly back up files from a specific directory to storage, you can create a Cron job using the following script:
#!/bin/bash
USERNAME=<login>
PASSWORD=<password>
BACKUP_PATH=<bucket_name>/<directory_path>
LOCAL_PATH=<local_directory_path>
duck --upload "hostman:/${BACKUP_PATH}" "${LOCAL_PATH}" --existing rename --username "${USERNAME}:swift" --password "${PASSWORD}" -q -y
The --existing
argument specifies what to do with existing files. The example above uses the rename
option, which renames an existing copy by adding the time and date. Other options include:
overwrite
to replace the existing file with the new version.skip
to upload only new files added after the last upload, skipping even modified duplicates.compare
for differential backup, which replaces the old version with the new if they differ in size, modification date, or checksum.Example:
duck --upload hostman:/<bucket_name>/<directory_path> <local_directory_path> --existing compare --username <login>:swift --password <password>
For information on all available options, use:
duck --help
The --synchronize
option lets you sync the content of a local directory with one in storage. Any changes, additions, or deletions made locally will be mirrored in storage, and vice versa, resulting in both directories having an identical file set in the same version.
Example:
duck --synchronize hostman:/<bucket_name>/<directory_path> <local_directory_path> --username <login>:swift --password <password>
To automatically perform synchronization and keep the file copies in storage up to date, you can create a Cron job with the following script:
#!/bin/bash
USERNAME=<login>
PASSWORD=<password>
BACKUP_PATH=<bucket_name>/<directory_path>
LOCAL_PATH=<local_directory_path>
duck --synchronize "hostman:/${BACKUP_PATH}" "${LOCAL_PATH}" --username "${USERNAME}:swift" --password "${PASSWORD}" -q -y