Before we went digital, we stuffed photos into albums and shoeboxes so that future generations could mock our haircuts. Now, though, the shoeboxes are gone - and if we're not careful, that means future generations might not have anything to mock.

Digital disaster can strike in all kinds of ways: you can accidentally erase camera memory cards; have hard disks fail; discover that you can't back up a baby scan because the DVD recorder has copy-protected it; lose MP3s stored online in a server crash; and find that your video camera won't talk to Vista or Leopard.

There are other dangers. There's no guarantee that Flickr, SD cards or Windows Media will be around in 10 years time, or that copy protection servers will still exist - as users of now-defunct legal download services have already discovered.

So how do you avert digital disaster and ensure your data lasts longer than you do?

Back it up

According to the 2008 PMA US Digital Imaging Survey, 41% of digital camera users don't back up their photos at all. Some of them don't even get the chance: data recovery firm Kroll OnTrack surveyed 100 UK digital camera users and discovered that 36 of them had lost valuable holiday snaps due to memory card problems or accidental deletion.

Backing up is a pain, but it's an essential and inexpensive one. External hard disks are as cheap as chips, online storage gets more generous by the day and if you're taking lots of shots when you travel, extra memory cards aren't too pricey. The more places your data is stored, the safer it is.

Sync soon

Don't keep files on memory cards or mobiles for too long. According to Kroll OnTrack Marketing Manager Phil Bridge, "We receive hundreds of requests every year from people who have lost holiday photos and are desperate to recover them... the longer photos are left on a memory card, the higher the risk of them being lost, damaged or of the card being overwritten."

Keep it open

Proprietary formats - that is, file formats that are specific to a particular manufacturer - are rarely a good idea, not least because they often go the way of the dodo. Always store files in a format that's widely supported (JPEG, TIFF or PNG for photos, MP3 for music, MPEG for video), avoid hardware that uses non-standard files and don't use copy protection.

Don't compress it

Once data is gone, it's gone - so don't compress your image, video or music files to save space. 128Kbps MP3s might be tolerable on an iPod, but they'll be awful if you buy better headphones or hi-fi kit.

Assume the worst

Flickr and its rivals may well be around in 10 years time - but then again, they might not. Backups to CD and DVD might last a decade - but then again, they might not. Your hard disk might never fail - but chances are it will. Never rely entirely on one kind of storage, and never put all your eggs in one basket.