# Tar en rsync ssh voor back-up op afstand

**URL:** <https://meta.discourse.org/t/tar-and-rsync-ssh-for-remote-backup/168784>\
**Category:** Product Support\
**Created:** [30 oktober 2020 om 19:27 UTC](https://meta.discourse.org/t/tar-and-rsync-ssh-for-remote-backup/168784 "2020-10-30T19:27:03Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![doguibnu](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/doguibnu/32/198690_2.png) [@doguibnu](https://meta.discourse.org/u/doguibnu)\
**Post date:** [30 oktober 2020 om 19:27 UTC](https://meta.discourse.org/t/tar-and-rsync-ssh-for-remote-backup/168784/1 "2020-10-30T19:27:03Z")

</div>

I am trying to do a remote backup with script:

```
find /path/*.gz -exec rm {} \; && tar -czpvf $BACKUP_DIR/bdsomething-$DATE.tar.gz --exclude='this-file' /source/path && rsync -avhz --progress --delete /path-dir-backup root@10.x.x.x:/path-remote-server

```

and give me error:

`rsync error: syntax or usage error (code 1) at main.c(1637) [Receiver=3.1.0]`  
`./script_bkp.sh: line 9: --delete: command not found`

I Have the same kind of script but without **–exlude** in other script and it works nice and it is in crontab

where wrong syntax? or usage? I do not understand.  
Please somebody can help me?

Thank you

Douglas

---

_[View the full topic](https://meta.discourse.org/t/tar-and-rsync-ssh-for-remote-backup/168784)._
