Cloudinary Blog

Automatic backup of user uploaded images using Cloudinary

By Nadav Soferman
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:
Copy to clipboard
Cloudinary::Uploader.upload("my_file.png", 
                            :public_id => "my_file", 
                            :backup => true)
PHP:
Copy to clipboard
\Cloudinary\Uploader::upload("my_file.png", 
                             "public_id" => 'my_file', 
                             "backup" => true)
Python:
Copy to clipboard
cloudinary.uploader.upload("my_file.png", 
                           public_id = 'my_file', 
                           backup = True)
Node.js:
Copy to clipboard
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

Our $2B Valuation

By
Blackstone Growth Invests in Cloudinary

When we started our journey in 2012, we were looking to improve our lives as developers by making it easier for us to handle the arduous tasks of handling images and videos in our code. That initial line of developer code has evolved into a full suite of media experience solutions driven by a mission that gradually revealed itself over the course of the past 10 years: help companies unleash the full potential of their media to create the most engaging visual experiences.

Read more
Direct-to-Consumer E-Commerce Requires Compelling Visual Experiences

When brands like you adopt a direct–to-consumer (DTC) e-commerce approach with no involvement of retailers or marketplaces, you gain direct and timely insight into evolving shopping behaviors. Accordingly, you can accommodate shoppers’ preferences by continually adjusting your product offering and interspersing the shopping journey with moments of excitement and intrigue. Opportunities abound for you to cultivate engaging customer relationships.

Read more
Automatically Translating Videos for an International Audience

No matter your business focus—public service, B2B integration, recruitment—multimedia, in particular video, is remarkably effective in communicating with the audience. Before, making video accessible to diverse viewers involved tasks galore, such as eliciting the service of production studios to manually dub, transcribe, and add subtitles. Those operations were costly and slow, especially for globally destined content.

Read more
Cloudinary Helps Minted Manage Its Image-Generation Pipeline at Scale

Shoppers return time and again to Minted’s global online community of independent artists and designers because they know they can count on unique, statement-making products of the highest quality there. Concurrently, the visual imagery on Minted.com must do justice to the designs into which the creators have poured their hearts and souls. For Minted’s VP of Engineering David Lien, “Because we are a premium brand, we need to ensure that every single one of our product images matches the selected configuration exactly. For example, if you pick an 18x24 art print on blue canvas, we will show that exact combination on the hero images in the PDF.”

Read more
Highlights on ImageCon 2021 and a Preview of ImageCon 2022

New year, same trend! Visual media will continue to play a monumental role in driving online conversions. To keep up with visual-experience trends and best practices, Cloudinary holds an annual conference called ImageCon, a one-of-a-kind event that helps attendees create the most engaging visual experiences possible.

Read more