found a way to do it natively so may be others will find it useful.
what i want from my backup:
- automatic
- incremental
- NAS to attached USB drive.
this functionality is not available out of the box. so here is a solution.
backup script can be placed anywhere, for simplicity we’ll put it in Public (/mnt/HD/HD_a2/Public/)
backup_local.sh:
#!/bin/sh
source=/mnt/HD/HD_a2/
dest=/mnt/USB/USB1_b1/backups
date=date "+%Y%m%d_%H%M%S"
rsync -rltDP
–delete
–delete-excluded
–log-file=$dest/backup-$date.log
–link-dest=$dest/current
–include ‘user1/’
–include 'user2/’
–include ‘Public/’
–include ‘Public/books/’
–include 'Public/music/’
–include ‘Public/photos/**’
–exclude '’
$source $dest/backup-$date
rm -f $dest/current
ln -s backup-$date $dest/current
more info about rsync time machine here: https://blog.interlinked.org/tutorials/rsync_time_machine.html
schedule
edit /usr/local/config/config.xml:
<crond>
<list>
....
<name id="102">my_backup_local</name>
</list>
...
<my_backup_local>
<count>1</count>
<item id="1">
<method>3</method>
<1>0</1>
<2>3</2>
<3>*</3>
<4>*</4>
<5>*</5>
<run>/mnt/HD/HD_a2/Public/backup_local.sh &</run>
</item>
</my_backup_local>
</crond>
reboot NAS
done!