Home > Utilities > Simple backup from the command line

Simple backup from the command line

I must say I don’t have much faith in Ubuntu’s sbackup program. Sure, it’s convenient and it’s got a GUI and automatically creates compressed incrementals backup in the background for you. But who knows if I’ll ever be able to actually restore my data from these compressed files? I prefer something where I can actually see what has been backed up, even if it’s a little less convenient.

For my backups, I use this command (that can be used in a cron job) that simply incrementally copies files onto a second hard drive:

cp -dpRuvx /home/yourfolder /media/data/backup 2> ~/Desktop/backup_errors.log

As a safeguard, all error output is redirected into a log file on my desktop. The drawback of this method is that files that you deleted on your source drive remain in the backup. That means that you have to do a clean backup every once in a while otherwise you’ll run out of space on your backup drive.

Categories: Utilities
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: