Delete old snapshots from Alfresco

If you're an Alfresco user, you may have noticed that it creates a snapshot of the store every time you publish something in the staging sandbox. In time this ads up to a lot of MB. If you wish to delete old snapshots of your store, here's the way to do it with version 2.2+ of Alfresco using the AVM Console

First, open up the console at http://host:port/alfresco/faces/jsp/admin/avm-console.jsp
In the command line box, write

lsver, mystore

(where mystore is the name of your store)
This command will list all the snapshots. Now, you can remove individual snapshots by their id with

rmver, mystore, version

or remove a bunch of snapshots between two dates with

rmvers, mystore, 2010-06-25T10:43:06.214Z, 2010-12-09T12:30:26.769Z

The dates you can get from the list of snapshots. The documentation says that the date must be in ISO 8601 but I got an error trying to copy-paste the date from the list with the timezone at the end (+01:00) so I replaced that with Z and worked just fine.


Alfresco CIFS shared drive authentication problem

I'm a newbie in Alfresco and honestly cannot find my way in there. If you are trying to develop a WebScript or some other type of service for Alfresco, you can either upload files one by one using the web interface or you can map the CIFS shared drive (\\workstationA\Alfresco\) and use it as a file-system. It seems it worked just fine in Windows XP and friends but I have Windows 7 and I simply could not make it work. It requests a user name and a password but then returns a "Failed to authenticate. Invalid user or password" message The hack I found seems really dumb and I'm sure there is a better solution out there but this works for me.

What you have to do is go to your hosts file (Windows\System32\drivers\etc\hosts) and add a new line in there mapping the workstaionA (Where workstationA is your computer name + the letter a) to some unused IP address. workstationA

That's it, now it works and you can map it as a network drive and do your development in peace.

net use X: \\workstationA\Alfresco /user:admin admin /persistent:yes

Note: admin/admin are the Alfresco default username and password, you should change that and use yours.

Happy codding !