ownBackup data location


I want to know if it is possible to change the location of the ownBackup folder, so it is outside the general ownCloud data directory.
This is because I want to back them up separately with cron.

Is there an entry that can be added to the config.php file to change the ownBackup location?



Hi Barry,

After a quick look into the source code, I found out this is hard coded to datadirectory/ownbackup - see https://github.com/pbek/nextbackup/blob/bdd51b2ee4697ae2d7458e15045237dd0163e424/service/configservice.php#L40
– so it is not configurable.

There are some ideas to reach your goal:

  • Backup software usually can be configured to follow or not to follow symlinks. So you cloud re-create the ownbackup folder as a symlink to somewhere out of the ownCloud root and configure your backup software (if this is applicable for you)
  • Patch the ownbackup code at the line I linked above to save to a custom directory. This must have rw-permissions for the apache user (requires some PHP programming skills)
  • Open a feature request at https://github.com/pbek/nextbackup/ so this option would get implemented in a future version


Thanks for the feedback.

I won’t edit my core coding as this will get effected at the next upgrade.

I have seen advise that these backups do not contain reliable back-ups for the full system and shouldn’t be relied on. I am tempted to turn these off and just use my own Cron jobs to backup the database, web folder and data folder.

Thanks for the information.