Skip to content

Commit 0425d6f

Browse files
committed
added more info and examples to readme
1 parent f40dbd7 commit 0425d6f

1 file changed

Lines changed: 27 additions & 1 deletion

File tree

README.md

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,36 @@
3030
# Basics
3131

3232
The idea is that you use BackupDrop to upload your backups, which (after upload) cannot be changed by the device you backed up. Some crypto lockers are actively looking for backup devices like NAS or backup drives and delete or encrypt them too.
33-
Using BackupDrop the machine you backed up cannot delete or modify or even access past backups.
33+
Using BackupDrop the machine you backed up cannot delete or modify or even access past backups. It's meant to be a push-only system so you can upload backups via CURL from any device you want to back up from.
3434

3535
Also BackupDrop can handle multiple external [storage providers](/rtfm/storage.md) and save the backups on `S3`, `FTP` or `NFS`.
3636

37+
## Upload using CURL:
38+
39+
```bash
40+
curl -s -F "file=@theFileYouWantToUpload" https://yourBackupDrop.server.url/[identifier]
41+
```
42+
43+
For every identifier there will be a directory created in the `data/` folder. It makes sense to use the hostname of the server of name of a specific application you're backing up.
44+
45+
## Example upload script
46+
47+
```bash
48+
#!/bin/bash
49+
set -e
50+
51+
mysqldump --all-databases > db.sql
52+
53+
paths="/etc/nginx/ /var/www/ /home/myuser db.sql"
54+
echo "[i] Starting compression"
55+
tar --exclude-vcs --exclude="backup.tar.gz" -c -v -z -f backup.tar.gz $paths
56+
echo "[i] done! Uploading"
57+
curl -s -F "file=@backup.tar.gz" https://yourBackupDrop.server.url/$(hostname)
58+
echo "[i] cleanup"
59+
rm backup.tar.gz
60+
rm db.sql
61+
```
62+
3763
You can and should encrypt files before uploading them (especially if you're using cloud endpoints) but if you can't, BackupDrop can handle it for you using public key or password encryption. [Read more](/rtfm/encryption.md)
3864

3965
# Quick start with docker

0 commit comments

Comments
 (0)