Cloudinary Blog

Automatic backup of user uploaded images using Cloudinary

As a website owner, you know the importance of having a robust web-based service. When a downtime may result in lost revenues, you strive to keep a highly available online solution.
 
A major part of having a robust service is a good contingency plan, that ultimately depends on regular backups of your website’s data. Your website’s code is probably backed up regularly, and so is your database, but have you given thought to backing up your dynamic website assets, such as your users’ uploaded images? 
 
Until today, using Cloudinary as-is would have gotten you most of the way there. Cloudinary offers a simple way for you to upload your website’s images and other resources to the cloud, offering high availability and robust delivery, that usually surpasses the capabilities of local hosting solutions. Even if a cloud-based hardware is damaged, its virtual nature makes sure that the data is kept safe and can be easily and transparently migrated to a replacement hardware.
 
But what about user errors, code mishaps and targeted attacks? A website user and even your admin might accidentally erase a critical user uploaded image. A vulnerability in your application may allow an attacker to perform mass deletion of images or replacing them with alternative content. How can these issues be thwarted?
 
Today, we are happy to announce Cloudinary’s new backup feature. This new feature addresses all the issues we’ve listed, while offering many additional benefits. 
 
From now on, in addition to safely storing uploaded images in a cloud based storage (Amazon’s S3 service), images can be automatically backed up to a safer location, where no casual API calls can penetrate. In addition, Cloudinary keeps multiple revisions for each uploaded resource for even greater robustness.
 

Enabling global and selective backups

Since backing up resources requires extra storage space, we made it optional. By default, backup is turned off.
 
To enable backup of your Cloudinary-managed resources, simply head to your management console and enable backup through the settings page. Changes will take effect immediately for all newly uploaded images.
 
Settings
 
To keep your costs down, Cloudinary’s new backup solution makes sure it backs up only your unique resources. Remotely fetched images, such as Facebook and Twitter profile pictures, are not backed up because they can be automatically re-created at any time. In addition, Cloudinary keeps backup copies only for your original images and not of the derived (transformed) versions of these originals, as these too can be re-generated on demand.
 
In addition to global backup, you can also selectively enable backups for specific, important files. To do this, simply specify the new 'backup' parameter in upload API calls. Below are some examples:
 
Ruby on Rails:
Cloudinary::Uploader.upload("my_file.png", 
                            :public_id => "my_file", 
                            :backup => true)
PHP:
\Cloudinary\Uploader::upload("my_file.png", 
                             "public_id" => 'my_file', 
                             "backup" => true)
Python:
cloudinary.uploader.upload("my_file.png", 
                           public_id = 'my_file', 
                           backup = True)
Node.js:
cloudinary.uploader.upload("http://www.example.com/image.jpg", 
    function(result) { console.log(result) }, 
    { public_id: 'sample_remote', backup: true })
Make sure you upgrade to our latest client libraries to ensure the backup support.
 

Backed-up resource browsing 

While browsing images using our management console you’ll notice that backed-up resources are now marked with a small safe icon. If the icon is red it means that a file has additional historical revisions.
 
Backup images
 
Clicking on the safe icon will list all revisions, allowing you to download historical versions of a backed-up resource.
 
Backup revisions
 
Deleted backed-up images are listed as well. They are grayed out and marked as non existing. You can still click the safe icon to download the deleted image backup.
 
Backup deleted
 

Backup solution availability

The automatic backup feature is now available for all free and paid plans of Cloudinary with no extra charge. 
 
If you use our Advanced paid plans (UPDATE) any of our paid plans, you can even choose to store all backed-up files on your own S3 bucket, instead of Cloudinary’s.
 
To summarize, Cloudinary’s new backup capability is an important tool in your robustness arsenal. It is another important step in making Cloudinary a complete, well-rounded solution to your website’s entire image management needs. 
 
We would love to hear your thoughts on this new feature. Use the comment thread below to share them.

Recent Blog Posts

How the Right Tools and Training Drive SDR Success

Here at Cloudinary, I head a team of eight SDRs, who are responsible for creating the first impression potential customers have of our company’s brand. In just the first 10 months of 2017, our team of outbound SDRs have been responsible for sending more than 67,000 personalized emails and making more than 15,000 calls.

Read more
The JS video player that developers will love (How To)

It doesn't take a genius (or a statistician) to know that video represents a significant proportion of web and mobile content these days. But did you realize that in 2017, video will account for about 75% of all internet traffic and that 55% of people watch videos online every day? In fact, 52% of marketing professionals worldwide believe that video is the content type with the best ROI, with people spending up to 2.6x more time on pages with video than on those without.

Read more
 Beyond Drupal Media: Make Images and Video Fly with Cloudinary

Drupal is a very popular open source content management system (CMS) that has been deployed countless times by organizations and developers around the world. Drupal gained a reputation for being very flexible, powerful and robust in creating complex websites. With Drupal, you can create everything from plain websites, blogs and forums to ambitious enterprise systems.

Read more
Curbing Terrorist Content Online

Today, Cloudinary is proud to announce that it has joined The Global Internet Forum to Counter Terrorism (GIFCT), to help fight the spread of terrorist and violent extremist content on the Internet. The forum was established by Facebook, Microsoft, Twitter and YouTube in mid-2017. Cloudinary will contribute to the hash-sharing database, which all contributing companies can use to help identify and block terrorist related images and videos upon upload.

Read more
Introducing the complete video solution for developers

Videos in web sites and apps are starting to catch up with images in terms of popularity and they are a constantly growing part of the media strategy for most organizations. This means bigger challenges for developers who need to handle these videos in their web sites and mobile apps. Cloudinary's mission is to solve all developer needs around image and video management. In this blog post, we are excited to introduce Cloudinary's complete cloud-based video management solution for developers.

Read more
Getting Started with StencilJS

Stencil is basically a compiler, not necessarily a UI library. A compiler that transforms TSX (TypeScript + JSX) into self-contained custom components.

Before you start learning about the tool, it’s important to note that Stencil is not another heavy JavaScript framework you need to learn. If you have worked with Angular or React, or understand web components, then Stencil is worth a look.

Read more