Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions dedibox/dedicated-servers/how-to/use-dedibackup-ftp-backup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,51 @@ ABOR, ACCT, APPE, CDUP, CWD, DELE, FEAT, LIST, MDTM, MKD, MODE, NLIST, NOOP, PAS
In case of a failure during authentication (wrong identifier and/or password), connection failure of the access control list (ACL), or failure of the automatic login from an unauthorized IP, the connection will be systematically terminated with the message **421 Service not available**.


### Usage on Linux

To connect to the Dedibackup service, we recommend `lftp` for interactive use and `curl` for automated tasks:

#### Recommended tools
* For interactive connections: Use `lftp`, which offers an interface and flexibility suitable for FTP sessions.
* For automated scripts: Use `curl` for automation, though some limitations exist with FTP servers that do not support all commands.

#### Example of interactive connection with lftp

For interactive sessions, use `lftp` with the following command:
```sh
apt install lftp # Requirement

FTP_HOST="ftp://dedibackup-dc3.online.net"
FTP_USER="sd-XXXXX" # Replace with your server ID or 'auto' for autologin
FTP_PASS="your_password" # Leave blank if using autologin

# - Connect to FTP server
# - Upload a file, list files, remove a file
# - Disconnect from FTP server
lftp -u "$FTP_USER,$FTP_PASS" "$FTP_HOST" <<EOF
# Change to the specified FTP directory
cd "/"
# Upload a file
put "path_to_your_file.7z"
# List files in the folder
ls
# Remove a file
rm "file_to_remove.7z"
bye
EOF
```
<Message type="note">
Passive mode in `lftp` is automatically managed, so manual configuration is usually unnecessary.
</Message>

#### Example of automated connection with curl
When automating tasks, you can use `curl`, though command limitations may apply:

```sh
# Upload a file
curl -T "path_to_your_file.7z" -u "sd-XXXXX:your_password" ftp://dedibackup-dc3.online.net/
```
<Message type="tip">
Replace `dedibackup-dc3` with the actual backup location (`-dc2`, `-dc3`, etc.), as specified in your Dedibox console.
</Message>