100 likes | 216 Vues
Learn about backup tools, methods, and best practices for ensuring data security and quick system restoration. Explore server backup procedures using command-line, text-based, and GUI utilities. Understand tar commands, tape management, and restore options. Discover how to back up and restore using tar and KDat, as well as Cisco router configuration backups via TFTP.
E N D
Introduction • Performing regular backups should be considered one of a responsible system administrator’s top priorities. • The safest method of doing backups is to record them on separate media, such as tape, writabel CD, DVD etc., and then store your backup sets in a separate location
Server Backup Procedures • Comand line tools (dd, dump, cpio, tar ...) • Text based utilities (Amanda, Taper ...) • GUI-based utilities (KDAT) • Comercial backup utilities (BRU, PerfectBackup+) • Choose considering the following factors: • Portability • Unatended or automated backups • User-friendliness • Remote Backups • Network Backups • Media Types
Backing up with “tar” • Take time to know the comand line options (“man tar”) • You need to know how to access the apropriate backup media • Example for full sistem backup onto the /archive/ filesystem with the exception of “/proc” , “/mnt” and “/archive” filesystems and without large cache files • #tar -zcvpf /archive/full-backup-`date ‘+%d-%B-%Y’`.tar.gz –directory / --exclude=mnt –exclude=proc –exclude=var/spool/squid • When writting directly to tape do not use compress (-z)
Working with your tape • Use “mt’ to rewind and eject: • mt -f /dev/nst0 rewind • mt -f /dev/nst0 offline
Backing up with KDat • If you are using KDE you can use Kdat • Kdat uses tar as engine (!) • User friendly and portable (read from comand line directly with tar) • Create backup profiles (at lest one for full backup and some other for selective/incremental backups) • Mount the tape and perform backups according to profile
Server Restore • Unarguably the one thing that is more important than performing regular backups is having them availamble when you need it • Restore method depends on your backup solution
Restore with “tar” • tar -zxvpf /archive/full-backup-09-Octomber-1999.tar.gz • If you don’t need to restore all files just specify the one(s) you need • Remember: tar strips leading / !!!
Restore with “KDat” • Using kdat just mount the tape and select apropriate options • Use “tar” to restore ...
Cisco router configuration Backups • Via tftp • Enable tftp service on a directly connected server • Remembre to set permisions to write and restrict afterwards • Just “write network” from the router prompt and respond with your tftp server details • To restore, you might need to access via console (if you cannot telnet into the router) and after seting up the link use “config network”