backup script

This commit is contained in:
Pavel Kuleshov 2023-02-15 06:36:57 +08:00
parent 3af0d1e5a9
commit 41ff688701

12
rsync_backup.sh Normal file
View File

@ -0,0 +1,12 @@
#!/bin/bash
PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
password_file='/etc/rsyncd.pwd'
exclude_file='/etc/rsyncd.exclude'
user='user'
ip='ip'
source='/opt /var/www'
destination='data/'
rsync -a --exclude-from=$exclude_file --password-file=$password_file $source $user@$ip::$destination