Hi Terry,

> >      read password
...
> >      remote=//readynas.local/TerryJColes/Backups/Optiplex/Duplicity/OptiPlex
> >      local=/mnt/Optiplex_Backups
> >
> >      uid=`id -u`
> >      gid=`id -g`
> >
> >      option=ro   # Read-only
> >      option+=,username=TerryJColes,password="$password"
> >      option+=,iocharset=utf8,uid=$uid,gid=$gid
> >      printf '%s\n' "$option"   # Eyeball.
...
> >      sudo -i mount -m -t cifs "$remote" "$local" -o "$option"
...
> How much of all that do I have to repeat, each time I want to backup
> or restore?  All of it, or just some of it?

All of it.  And always in a single terminal window because the shell
variables are particular to the shell you create them in.

I can see four choices.

- Keep doing the above.

- Convert those actions into a shell script.

- Move parts of the above into /etc/fstab and a credentials file so
  a simpler ‘sudo -i mount /mnt/Optiplex_Backups’ works.
  If it stops working then you can examine the incremental step you've
  made knowing it's you, not it.

- Take the working lines above to the people you're talking to about the
  GUI SMB mounter so they can advise the GUI equivalent in their
  program.

-- 
Cheers, Ralph.

-- 
  Next meeting: Online, Jitsi, Tuesday, 2026-10-06 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  https://dorset.lug.org.uk
  New thread, don't hijack:  mailto:[email protected]

Reply via email to