I'm running Ubuntu Server and I'm looking for an efficient way of performing nightly backups of particular directories using cron. However, since the computer isn't always on, I'd like it to just run when the computer is on and to keep the last 5 backups. Would I need to use a bash script of some kind to achieve this?
Ubuntu – How to setup nightly backups via the command line
backupcommand linecron-jobsserver
Related Question
- Ubuntu – Get a file’s emblem from command line
- Ubuntu – Script for an incremental file system backup
- Ubuntu – How to limit the space assigned to Déjà Dup backups
- Ubuntu – How to backup and restore Firefox bookmarks from command line
- Permissions – Fixing ‘Permission Denied (publickey)’ Errors in rsync + ssh Cron Job
- Command-Line, Suspend, Power Management, Hibernate – How to Temporarily Disable Sleep and Hibernate from Command Line
- Ubuntu – Ubuntu Touch change system settings from command line (silent mode specifically)
Best Answer
You can use tar and rsync for a combination of full & incremental backups and there is a tutorial here that sets it up to do nightly / weekly backups using cron.