README.md aktualisiert
Consistent name for user executing the backup.
This commit is contained in:
@@ -33,7 +33,7 @@ The script throws out a log file of its activities. It is meant to be visible in
|
|||||||
|
|
||||||
To give unrestricted access to everything via sudo is not a good idea. I'd choose to restrict elevated permissions to the specific commands needed.
|
To give unrestricted access to everything via sudo is not a good idea. I'd choose to restrict elevated permissions to the specific commands needed.
|
||||||
|
|
||||||
In the sudoers file add the following lines.
|
I chose `cloudbackup`to be the user for doing the backup, you are free to chose anything else. In the sudoers file add the following lines.
|
||||||
|
|
||||||
```
|
```
|
||||||
# Cmnd alias specification
|
# Cmnd alias specification
|
||||||
@@ -47,8 +47,8 @@ cloudbackup ALL=(www-data) NOPASSWD: OCC_NC, RSYNC
|
|||||||
cloudbackup ALL=(www-data) NOPASSWD: MAINTENANCE_ON, MAINTENANCE_OFF
|
cloudbackup ALL=(www-data) NOPASSWD: MAINTENANCE_ON, MAINTENANCE_OFF
|
||||||
```
|
```
|
||||||
### cronjob
|
### cronjob
|
||||||
in crontab create an entry for the `cloud_backup.sh`. Replace `user` with yours doing the backup.
|
in crontab create an entry for the `cloud_backup.sh`. Replace `cloudbackup` with yours doing the backup.
|
||||||
```
|
```
|
||||||
# Nextcloud backup
|
# Nextcloud backup
|
||||||
12 1 * * 1 user /home/cloudbackup/cloud_backup.sh
|
12 1 * * 1 cloudbackup /home/cloudbackup/cloud_backup.sh
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user