I have several CentOS servers (ver 7) with the NextCloud client installed on them. We are using cron run the nextcloudcmd binary (periodically).
I currently have:
- a .netrc with a single entry in it – e.g. “default login DevUser password DevUserPW”.
- A crontab entry that looks like: /usr/bin/nextcloudcmd -n /home/UserName/sw_repo http://www.xxx.yyy.zzz/remote.php/webdav/ .
I have a new requirement on these CentOS systems – the single service account that is running the existing replication task – needs to replicate data from multiple users from the same NextCloud server. (e.g. DevUser and now QAUser).
We figure we could use multiple .netrc files (e.g. .netrc.DevUser & .netrc.QAUser, and swap them into a .netrc right before the replication is scheduled.
Is there a way for us to have a single .netrc file – where the nextcloudcmd client can reference the account we want to work with (either UserDev or UserQA)?
Could someone point me to documentation on how this is configured? Or maybe post an example of their .netrc along with how the nextcloudcmd is configured to work with multiple nextcloud accounts ?
I would be willing to entertain a different direction - for example use of a $HOME/.local/share/data/Nextcloud/nextcloud.cfg file maybe ? (( I dont have X11 on these nextcloud clients - but I could pull a nextcloud.cfg from a CentOS desktop system with X11 & NextCloud GUI running on it ))… I have not seen any clear info on how to set that up …
Thanks in advance - I hope I have made myself clear …