I'm writing a backup script in BASH on a linux machine (gentoo)
The script will backup all folders in a certain directory.
The folders will have varying privileges and belong to different users and groups.
In order to make sure my backup script has read privileges to all the the files and folders I'm tempted to run the backup script as root.
Is this safe? Are there any specific techniques to achieve this without root privileges?
cron is the best way to do that, and yes certain scripts need to run with root otherwise you are not able to read from users home directory with 700 privileges.
It's very hard to make bash scripts safe when running as root. Be very careful that you've got the script bullet proof. Check the return codes of all commands if their failing can have bad effects.
I'd usually recommend a scripting language such as perl, python, ruby etc, which are easier to make safe.