Skip to content

Commit d59d416

Browse files
QuentinCGLaure-di
authored andcommitted
docs: use-dedibackup-ftp-backup: Adding Linux example (scaleway#3928)
1 parent 0d6bd5e commit d59d416

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

dedibox/dedicated-servers/how-to/use-dedibackup-ftp-backup.mdx

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,3 +101,51 @@ ABOR, ACCT, APPE, CDUP, CWD, DELE, FEAT, LIST, MDTM, MKD, MODE, NLIST, NOOP, PAS
101101
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**.
102102

103103

104+
### Usage on Linux
105+
106+
To connect to the Dedibackup service, we recommend `lftp` for interactive use and `curl` for automated tasks:
107+
108+
#### Recommended tools
109+
* For interactive connections: Use `lftp`, which offers an interface and flexibility suitable for FTP sessions.
110+
* For automated scripts: Use `curl` for automation, though some limitations exist with FTP servers that do not support all commands.
111+
112+
#### Example of interactive connection with lftp
113+
114+
For interactive sessions, use `lftp` with the following command:
115+
```sh
116+
apt install lftp # Requirement
117+
118+
FTP_HOST="ftp://dedibackup-dc3.online.net"
119+
FTP_USER="sd-XXXXX" # Replace with your server ID or 'auto' for autologin
120+
FTP_PASS="your_password" # Leave blank if using autologin
121+
122+
# - Connect to FTP server
123+
# - Upload a file, list files, remove a file
124+
# - Disconnect from FTP server
125+
lftp -u "$FTP_USER,$FTP_PASS" "$FTP_HOST" <<EOF
126+
# Change to the specified FTP directory
127+
cd "/"
128+
# Upload a file
129+
put "path_to_your_file.7z"
130+
# List files in the folder
131+
ls
132+
# Remove a file
133+
rm "file_to_remove.7z"
134+
bye
135+
EOF
136+
```
137+
<Message type="note">
138+
Passive mode in `lftp` is automatically managed, so manual configuration is usually unnecessary.
139+
</Message>
140+
141+
#### Example of automated connection with curl
142+
When automating tasks, you can use `curl`, though command limitations may apply:
143+
144+
```sh
145+
# Upload a file
146+
curl -T "path_to_your_file.7z" -u "sd-XXXXX:your_password" ftp://dedibackup-dc3.online.net/
147+
```
148+
<Message type="tip">
149+
Replace `dedibackup-dc3` with the actual backup location (`-dc2`, `-dc3`, etc.), as specified in your Dedibox console.
150+
</Message>
151+

0 commit comments

Comments
 (0)