Archive revisions
Archive revisions, and access and restore archived revisions.
Read time 2 minutesLast updated 21 days ago
Set up a separate disk device and store large revisions there so they don't take up unnecessary space in the database. Some files, such as third-party compiled tools, programs, binaries, and other large files, rarely change and you rarely access them in a production environment. It costs disk space and time to store and retrieve these revisions from the database, so you can archive these files instead. Then, when you need to access those revisions, Unity Version Control (UVCS) searches for them in the external storage to retrieve them.
Archive a revision
To archive a revision, use the
cm archivecm archive C:\mybigfile.tar#br:/main#0 -c="big file of libraries" -f="/home/plastic/bigfileTARrev0"
- The command archives revision 0 of the main branch of the item. It creates several chunks of the revision, each one of which contains a part of the revision content.
mybigfile.tar - UVCS creates the archive files in .
/home/plastic/bigfileTARrev0 - The parameter is a prefix for the archive files that you can use as a destination path for the archives. If you omit the
-fswitch, UVCS creates the archived files in the current directory.-f
cm archive --helpAccess archived revisions
To access data stored in an external location, you need to create anexternaldata.confexternaldata.confThere are two locations that you can create theE:\archivesOfRepository1D:\mybigfiles\revisionsOfBigFileTARF:\revisionsOfThe2_9Release
externaldata.conf- If you place the configuration file in the UVCS server location, you allow every user to automatically access those revisions as long as the external storage area is available.
- If you place the configuration file in the UVCS client folder or in the user local directory, you can supply the archived contents to users individually and they can configure on the client side.
externaldata.conf
Configuration file in the GUI
If a user tries to access any stored revision from the GUI and there is noexternaldata.confexternaldata.confexternaldata.confConfiguration file in the CLI
From the CLI (command-line interface) an externaldata.conf needs to always be available. If not, the command line asks you for anexternaldata.confRestore archived revisions
You can use the command line to restore archived revisions back into the database, so you can safely delete the archives. Then, UVCS returns to using the database to retrieve the data. To restore archived revisions, use the--restoreThe example restores revisioncm archive C:\mybigfile.tar#br:/main#0 --restore
0mybigfile.tar