rsync to backup two folders to the same target disk in a nightly cron-job:
rsync -avz /very/important/data /Backup/VID/ rsync -avz /other/stuff /Backup/tmp/
The first job backups more important data than the second one (e.g. mailbox vs movie collection), so i want to make sure that this job succeeds. Also the first job has a way smaller data volume than the first one.
Now I'm facing problems when the disk gets full:
- Monday night: the first job succeeds, but the second one fills up the disk and eventually stops with a "disk full" message. That's OK (kindof).
- Tuesday night: since the backup disk is still full from the previous night, this time already the first job fails. Now this is bad.
So I was wondering how to limit the available (destination) disk space of the second rsync job: if I could tell the second job that there was (say) 3GB less space available, it would exit earlier and leave space for the important job next day.
A first idea would be to create a large temporary file on the backup disk (after the first job has finished, before the second one started), and delete that file after the second job has finished (and before the next round).
Now I would like to avoid this, as the backup disk is really an NFS-mount and creating GB of dummy files on that device just for the sake of keeping space free is rather slow.
- Debian/GNU linux 8.2 (jessie)
I don't have access to the NFS-server.