I have been running my rsync routine on a crontab process for the past couple of months but today I received an error related to lack of space in my root directory. As explained in the title, I have set up a fstab ip file system configuration onto my root specifically onto /mnt and have been running the following code

`0 16-22 * * 6 sudo rsync -avzpEo --delete-delay /home/ /mnt/Rsync_Dell/`

Today, however, I have received the error that my partition was full to the point I could not run anything anymore (used live media to purge files) and found out that my mnt directory was full and clogged my root partition.

My question is how is it possible that I clogged my system if the rsync is sending files to my server? how can I prevent that? should I change the delete-delay to delete-during?

The space dedicated to root is 40 GB whereas the home is 150 GB and the destination server is 750 GB.

  • That rsync command does not seem to be complete. If it is, then you are rsyncing to some place (whatever the working directory of the cronjob is). – Eduardo Trápani Jun 14 '20 at 20:55
  • you are right, I fixed the destination directory. As said in the body I linked in the fstab the IP address of the server, and by double checking everything is fine in the backup files in the server. It is just that I don't understand why but the root partion got full after a while. – Alessio_110 Jun 14 '20 at 21:01
  • Have you gone looking for the files filling the space? If not then you really need to go hunting for that first. I would use du --max-depth 1 to help you narrow down where the files are. There are ways that one process may not be able to see the mount-points you expect, so you might want to unmount /mnt and double check there's no files stored on /mnt in the root fs. – Philip Couling Jun 14 '20 at 21:06
  • Well, the fact is that when I shut down the pc and boot the live media, I scanned the pc and found that /mnt was full of files, how's it possible if it is supposed to be linked to the server? – Alessio_110 Jun 14 '20 at 21:18
  • 1
    So you mean that it may be that by some error during the process, instead of transferring data to the server it actually copied it locally messing up everything? – Alessio_110 Jun 14 '20 at 22:46

You are running a verbose rsync inside a cronjob.

That generates huge messages that will be emailed to you. Check the size of /var/spool/mail.

If you do not have local delivery setup, then you could have a very big file named dead.letter in your /root or /home/YOUR_USER

Anyway, your best be now might be to run baobab for example, to know what's eating up your space.

And you probably should make rsync a lot quieter.

  • /var/spool/mail is empty – Alessio_110 Jun 14 '20 at 21:16
  • When I run it on my pc unplugged it showed that backed up files were stored in the machine rather than the server, now they seem they are being stored only in the server. Is it possible that rsync broke down and files were temporarily saved locally? – Alessio_110 Jun 14 '20 at 21:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.