Announcement

Collapse
No announcement yet.

Quotas on disk based on Users or group

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Quotas on disk based on Users or group

    Does uberSVN offers quotas on disk base on users or groups?

  • #2
    Hi Bouster,

    I don't believe there's any reasonable way in Subversion to impose disk quotas against individual users or groups. The problem is that with a normal disk quota the user can easily delete files and get the space back. But in Subversion that's not possible - a user can't remove files once committed to the repository, so the only option if a quota was reached would be for the admin to increase the quota.

    Perhaps you could say more about what you need to use this for? There might be other options we could suggest, such as limiting the size of individual commits. That could go some way to protecting disk space and would be easy enough to implement with uberSVN.

    Best Wishes,

    Ian

    Comment


    • #3
      Quotas

      Hi Ian,
      My comments below

      - a user can't remove files once committed to the repository
      A user cannot reorganise the repository?

      The quota is needed fo space management. If needed i can increase the space and the quota.

      How I am going to limit the size of individual commits or folders perhaps?

      Is there available file extensions check for commits?

      The most importand things for us is the following:
      Protecting disk space.
      Protect files commited to the repository.

      Thanks for the prompt response.
      Regards
      Lefteris

      Comment


      • #4
        Hi Lefteris,

        You can move files about the repository but once you commit a file it's there forever. Remember that the point of Subversion is to allow you to roll back to or see the history of any file at any revision number. Even if you delete a file from the current revision it still exists in previous revisions and as such you don't reclaim any disk space.

        You can limit the size of individual commits using a hook script, which you would install into the hook directory of repositories where you want the limits to apply. There are a number of different scripts that basically do the same thing - This one would be a good example. http://www.davidgrant.ca/limit_size_...with_this_hook

        Best Wishes,

        Ian

        Comment


        • #5
          Limit the space

          Hi Ian,

          I am sorry not responding for so long but here are my comments:
          You have right about space and deleting files but i want to limit this.
          SVN is expanding dramatically is my organization and I want to control it. So limiting the disk space or individual commits it will help.
          Yes I want the user to ask for increase quota. In this way user will ot ask quota increase many times. Additinaly I will have from the beginning some preassigned quota templates for storage.

          If I could protect the disk space that will be great in addition to limiting the extesnions available to commit. Many of my users are commiting their pst files(Outlook) or other files , I dont consider importnad for SVN as its for MAINLY documents. They can use their ftp space for other files.

          So I need to undestand how to implement hook scripts , on using disk space quota and file extensions at the beginning so I dont have problems after the filesystem of my server is full.

          I hope you understand my needs.
          If you dont please let me know and I will make sure that you understand.

          Best Regards
          Lefteris

          Comment


          • #6
            Originally posted by bouster View Post
            If I could protect the disk space that will be great in addition to limiting the extesnions available to commit. Many of my users are commiting their pst files(Outlook) or other files , I dont consider importnad for SVN as its for MAINLY documents. They can use their ftp space for other files.

            So I need to undestand how to implement hook scripts , on using disk space quota and file extensions at the beginning so I dont have problems after the filesystem of my server is full.
            A quota system will not fix this. You do not have a purely technical problem here, you have a behavioral problem too. Whoever is giving people the idea that they should put everything they can think of into SVN needs to be stopped. And you need explicitly to tell people to stop putting things like PST files in the repository.

            Then put in hook scripts to stop people from adding/committing PST files (and others that shouldn't be versioned). Just block them outright. After a few weeks of getting their hands slapped by the system, people will learn. If they can't learn how to do their job right, they should be looking elsewhere for employment IMHO.

            Once you've done that, take the repository offline, dump it, run it through svndumpfilter to strip out the PST and other files that shouldn't be in there, and get it back online.

            Comment


            • #7
              Hook Scripts

              Any guide how to create a hook script.
              I have searched on the Internet and I have found a perl script to do this.
              Now I have to installed it on my windows server and then run the hook script.
              I am completely confused.



              Originally posted by andyl View Post
              A quota system will not fix this. You do not have a purely technical problem here, you have a behavioral problem too. Whoever is giving people the idea that they should put everything they can think of into SVN needs to be stopped. And you need explicitly to tell people to stop putting things like PST files in the repository.

              Then put in hook scripts to stop people from adding/committing PST files (and others that shouldn't be versioned). Just block them outright. After a few weeks of getting their hands slapped by the system, people will learn. If they can't learn how to do their job right, they should be looking elsewhere for employment IMHO.

              Once you've done that, take the repository offline, dump it, run it through svndumpfilter to strip out the PST and other files that shouldn't be in there, and get it back online.

              Comment


              • #8
                Originally posted by bouster View Post
                Any guide how to create a hook script.
                I have searched on the Internet and I have found a perl script to do this.
                Now I have to installed it on my windows server and then run the hook script.
                I am completely confused.
                On Windows, a Perl script must be called from a BAT, CMD or EXE. Perl scripts can't be executed natively as hooks.

                Comment


                • #9
                  Hi,
                  I understand this. Can you give me an example please.
                  As I am thinking this would be like this.
                  Install active perl. Create the perl script and call the perl script though a batch file. After that I will call the batch file though the hook script.
                  What is the command on this.
                  Can you please suggest me what I need to learn in order to write from scratch hook scripts?

                  Many thanks

                  Comment


                  • #10
                    Originally posted by bouster View Post
                    Hi,
                    I understand this. Can you give me an example please.
                    As I am thinking this would be like this.
                    Install active perl. Create the perl script and call the perl script though a batch file. After that I will call the batch file though the hook script.
                    What is the command on this.
                    Can you please suggest me what I need to learn in order to write from scratch hook scripts?

                    Many thanks
                    Almost.... The batch file *is* the hook script.

                    Comment


                    • #11
                      I did a quick Google and there is a lot of help out there for writing hook scripts for Windows.

                      For example the content and links from the comments at http://www.codersrevolution.com/inde...for-Subversion might provide a useful starting point in helping you understand what needs to be done here.

                      Ian

                      Comment


                      • #12
                        Hook Script

                        Originally posted by mbooth View Post
                        Almost.... The batch file *is* the hook script.
                        What I have to write in the hook tab then to call the batch file????

                        Comment


                        • #13
                          Thank you everybody for valuable information!!!

                          Comment

                          Working...
                          X