I have a VPS with Wordpress (including storage and database on the same machine).
Now I want to make daily backups to an external service (AWS S3): the issue is that first I need to generate a tar of the storage and a dump of the database, and those are temporary stored on the local filesystem. Basically half of disk space should be kept free in order to being always able to perform this important operation.
Basically the backup should never fail due to shortage of free disk space.
How can I achieve that?
How can I reserve space (some GBs) for a folder (e.g. backup
folder)?
Or, alternatively, can I reserve some space to a user (e.g. backupdaemon
user)?
Other solutions?