- as stumbling newby , hesitate to express opinion : maybe something like :
<rsync -av --delete-after /home/mike /dev/sdc> [ or what ever the destination is categorized] On Sat, Oct 17, 2020 at 1:27 AM Mike McClain <mike.junk...@att.net> wrote: > I've been using rsync to backup to a flash drive but it's not > performing exactly as I expected. > > The man page says: > --delete delete extraneous files from dest dirs > A section of the backup script is so: > Params=(-a --inplace --delete); > Flash=/sda/rpi4b > cd /home/mike > [ ! -d $Flash/mike ] && mkdir $Flash/mike; > > # exclude compressed files and the contents of most of the .* directories > /mc/bin/mk_rsync_exclude.sh > echo /usr/bin/rsync $Params --exclude-from=/home/mike/.rsync_exclude . > $Flash/mike > /usr/bin/rsync $Params --exclude-from=/home/mike/.rsync_exclude . > $Flash/mike || > echo rsync $Params --exclude-from=/home/mike/.rsync_exclude . > $Flash/mike Failed $? ; > > If I delete a file from my home directory then backup over last > week's copy the deleted file stays in the backup directory and these > build up over time. > Am I misusing rsync or am I just not understanding how it works? > > Thanks, > Mike > -- > "First say to yourself what you would be; > and then do what you have to do." > - Epictetus > >