0

I am checking out what is the best way to backup our repository weekly. What would be the best approach?

We have many projects that are built daily with Jenkins, so:

  • maven copy snapshot/release files to our repositoy (Artifactory);

  • every day at night we backup Jenkins stuff using this plugin;

  • every day at night we do Artifactory backup using this approach;

  • weekly we do another full backup with Artifactory *

* I think that the weekly backup isn't needed, since we should weekly backup the current day backup using a external backup tool (like rsync)

The main idea is to understand what is the best backup strategy.

So, how do you backup your stuff?

rodrigocprates
  • 498
  • 6
  • 22

2 Answers2

2

The Artifactory backup strategy truly depends on the size of your repository. The built-in backup/restore function provides a very easy to handle backup (kind of a local maven repository) but it takes relatively long time to run (both ways) because the checksum storage needs to be serialized/deserialized. So, if you repository is not too big, that's the easiest way to go.

Once you reach a point when the restore time is too long to be useful, you might want to switch to rsync the storage and hot backup of the database (similar to the process described here). The restore becomes tricky (need to pay attention to time-sync between the storage and the db), but this method allows keeping MTR appropriate.

JBaruch
  • 22,610
  • 5
  • 62
  • 90
1

For large artifacts, synchronization of the storage and hot backup of the database is a more appropriate choice. Fault-tolerance can be achieved by correctly replicating the data folder to a warm standby server. Instead of rsyncing, you might use BitTorrent-based Resilio Connect, which makes synchronization way faster and achieve backup process in a very short time. See this writeup on how this product could help with artifacts distribution and backup.