Are there instructions somewhere for this?
How do I delete old versions of my application from my Subversion repository?
- Fountain
- Posts: 19
- Starts: 10
- Wiki Edits: 0
- Location: New York City
I'm starting to run out of space and need to delete some of my older revisions. I tried looking through the SVN documentation, but I couldn't find clear instructions.
Are there instructions somewhere for this?
Are there instructions somewhere for this?
- Varun
- Posts: 410
- Starts: 0
- Wiki Edits: 0
You may need to run a cronjob to delete the directories that are older than what is required using a bash script.
for eg: the command below would delete directories older than "X" days.
find /home/user/<revision_direcory>/ -mtime +X -type d | xargs rm -rf
replace "x" with your preferred date.
for eg: the command below would delete directories older than "X" days.
find /home/user/<revision_direcory>/ -mtime +X -type d | xargs rm -rf
replace "x" with your preferred date.
2008-06-29 09:34 AM
- Fountain
- Posts: 19
- Starts: 10
- Wiki Edits: 0
- Location: New York City
It's my understanding that this can also be handled through capistrano. Can you recommend the best approach for removing old versions using capistrano?
2008-06-29 10:30 AM
- William
- Posts: 1010
- Starts: 32
- Wiki Edits: 56
You can just add the rm commands in your Capfile restart task.
I know there is also a deploy.rb line that limits the number of releases, I can't seem to find via Google at the moment but I'll keep looking...
I know there is also a deploy.rb line that limits the number of releases, I can't seem to find via Google at the moment but I'll keep looking...
2008-06-29 11:23 AM
- Fountain
- Posts: 19
- Starts: 10
- Wiki Edits: 0
- Location: New York City
I did some googling and came up with this:
Put this line in your deploy.rb:
set :keep_releases, 4
Change the last number to how many releases you want to keep. Save your file.
From your application folder type:
cap deploy:cleanup
It may take a few minutes to finish depending on how many releases you have archived.
Put this line in your deploy.rb:
set :keep_releases, 4
Change the last number to how many releases you want to keep. Save your file.
From your application folder type:
cap deploy:cleanup
It may take a few minutes to finish depending on how many releases you have archived.