I would like to limit the amount of data my Deja dup backup will try to put on its corresponding Dropbox folder, say limit it only to 500MB? Is it possible to set a disk quota on a file folder?
3 Answers
Aside from a loop mount as arhimed suggests, the only way I know of doing this would be to use XFS, which supports "project quotas": quotaa for specified directory trees, not just entire filesystems.
Install quota . It will help you to set limit amount of memory.
sudo apt-get install quota
-
1That's for limiting how much a user can use, not how large a directory can be.– psusiJul 20, 2012 at 20:04
-
1Than I know only one way: create file and mount it as folder. Sth like
dd if=/dev/zero of=/userdisk.fs bs=1024 count= 100000
,mkfs.ext3 /userdisk.fs
,mount -t ext3 -o loop /userdisk.fs /home/user
– Viktor KJul 20, 2012 at 20:18
The granularity of quotas depends on the filesystem you are using.
- XFS implements project quotas (already mentioned by grifferz)
- ZFS implements quotas and reservations, and, since with proper planning at the layout stage it is able to handle any directory as nested filesystem, it is able to apply a quota to a specific directory. For a brief explanation of quotas in ZFS, I recommend the BSD Documentation, for the complete treatment, check Oracle.