USTM16 Linux System Administration



Similar documents
Advanced SUSE Linux Enterprise Server Administration (Course 3038) Chapter 5 Manage Backup and Recovery

Planning for an Amanda Disaster Recovery System

Replacing a Laptop Hard Disk On Linux. Khalid Baheyeldin KWLUG, September 2015

Customizing Boot Media for Linux* Direct Boot

Creating a Cray System Management Workstation (SMW) Bootable Backup Drive

USB 2.0 Flash Drive User Manual

System Administration. Backups

Do it Yourself System Administration

Linux System Administration

WES 9.2 DRIVE CONFIGURATION WORKSHEET

Acronis True Image 2015 REVIEWERS GUIDE

Network Attached Storage System Recovery Procedure

Cloning Complex Linux Servers

ManageEngine EventLog Analyzer. Best Practices Document

FileCruiser Backup & Restoring Guide

Backup to attached Tape Drive using Open-E DSS V6

Linux System Administration on Red Hat

ManageEngine EventLog Analyzer. Best Practices Document

Linux System Administration. System Administration Tasks

Computer Backup Strategies

NSave Table of Contents

Online Backup Client User Manual

Managing Data Protection

LBNC and IBM Corporation Document: LBNC-Install.doc Date: Path: D:\Doc\EPFL\LNBC\LBNC-Install.doc Version: V1.0

Partek Flow Installation Guide

TELE 301 Lecture 7: Linux/Unix file

Recover Tab & RecoverAssist User Guide

User Guide. Laplink Software, Inc. Laplink DiskImage 7 Professional. User Guide. UG-DiskImagePro-EN-7 (REV. 5/2013)

SIRIS. Bare Metal Restore Guide

Chapter Contents. Operating System Activities. Operating System Basics. Operating System Activities. Operating System Activities 25/03/2014

BackupAssist Common Usage Scenarios

Linux Disaster Recovery best practices with rear

RocketRAID 2640/2642 SAS Controller Ubuntu Linux Installation Guide

ITA Mail Archive Setup Guide

RecoveryVault Express Client User Manual

BounceBack Server Solution Reference Guide

Relax and Recover (rear) Workshop

In this chapter, we want to make sure that your computer (and you) is ready for the Red Hat Linux installation.

USB Bare Metal Restore: Getting Started

BrightStor ARCserve Backup for Linux

Digital Forensics Tutorials Acquiring an Image with FTK Imager

Online Backup Linux Client User Manual

Online Backup Client User Manual

RocketRAID 174x SATA Controller Ubuntu Linux Installation Guide

Best practices for operational excellence (SharePoint Server 2010)

Installing the Operating System with Express Setup

BACKUP YOUR SENSITIVE DATA WITH BACKUP- MANAGER

Capturing a Forensic Image. By Justin C. Klein Keane <jukeane@sas.upenn.edu> 12 February, 2013

Attix5 Pro Server Edition

One Solution for Real-Time Data protection, Disaster Recovery & Migration

Support for Storage Volumes Greater than 2TB Using Standard Operating System Functionality

1. Product Information

PCIe AHCI-IP Demo Instruction Rev Jul-15

Online Backup Client User Manual Linux

Change: "netsh interface ipv4 set address "local area connection" static "

NI Real-Time Hypervisor for Windows

Encrypting Your Files. Because nobody else will And would you trust them if they did?

Backup Software Technology

Sawmill Log Analyzer Best Practices!! Page 1 of 6. Sawmill Log Analyzer Best Practices

System deployment and bare metal recovery by Clonezilla

Overview. Remote access and file transfer. SSH clients by platform. Logging in remotely

Installing MooseFS Step by Step Tutorial

Using iscsi with BackupAssist. User Guide

IN STA LLIN G A VA LA N C HE REMOTE C O N TROL 4. 1

USB Flash Memory TransMemory-EX II TM

About Backing Up a Cisco Unity System

Determining the Correct Usage of Swap in Linux * 2.6 Kernels

Linux+ Guide to Linux Certification, Third Edition. Chapter 11 Compression, System Backup, and Software Installation

Release Notes: NovaBACKUP v16.1

How to Restore a Linux Server Using Bare Metal Restore

EVault Software. Course 361 Protecting Linux and UNIX with EVault

Recommended Backup Strategy for FileMaker Pro Server 7/8 for Macintosh & Windows Updated March 2006

USB bootable Ubuntu Kickstart Howto

Crash Proof - Data Loss Prevention

Technical Note TN_146. Creating Android Images for Application Development

Using Depositit to Backup Microsoft Exchange Server

IBM Rapid Restore PC powered by Xpoint - v2.02 (build 6015a)

USB Flash Drive User s Manual

Acronis Backup & Recovery 10 Server for Windows. Installation Guide

NSS Volume Data Recovery

EaseUS Partition Master

Rsync: The Best Backup System Ever

Table of Contents. Online backup Manager User s Guide

A Better Approach to Backup and Bare-Metal Restore: Disk Imaging Technology

LTFS for Microsoft Windows User Guide

Cloud Panel Service Evaluation Scenarios

Advantages of Amanda over Proprietary Backup

Division of Administration (DOA) Desktop Support

EXi PREP. Solaris 10. System Administration. llllllllllllllll. Bill Calkins. ULB Darmstadt

How To Back Up A Computer To A Backup On A Hard Drive On A Microsoft Macbook (Or Ipad) With A Backup From A Flash Drive To A Flash Memory (Or A Flash) On A Flash (Or Macbook) On

BackupPC. Network Startup Resource Center

SAP Netweaver 7.3 on Amazon Cloud

Intelligent disaster recovery. Dell DL backup to Disk Appliance powered by Symantec

VMware vsphere Data Protection 5.8 TECHNICAL OVERVIEW REVISED AUGUST 2014

Data Integrity: Backups and RAID

BackupAssist v6 quickstart guide

Transcription:

USTM16 Linux System Administration Lesson 4: Memory Management and Backups Instructor: Peter Chung (cspeter@cse.ust.hk) Peter Chung (cspeter) 1

GNOME System Monitor A graphical user interface to display the memory usage System => Administration => System Monitor Two concepts here: Memory Swap Peter Chung (cspeter) 2

Memory and Virtual Memory In a typical computer system, memory space is much smaller than disk space Example: 4GB RAM, 1TB (1000GB) hard disk Virtual Memory Using disk as an extension of RAM Usually managed by the underlying operating system to increase the effective size of usable memory It is usually called swap space In Linux, swap space can be a swap file a swap partition Peter Chung (cspeter) 3

Creating a swap file (1/2) Example dd if=/dev/zero of=/extra-swap bs=1024 count=1024 dd is a special command to convert and copy a file The first part: dd if=/dev/zero of=/extra-swap /dev/zero is a special device to generate 0 s and it acts as an input stream bs refers to block size (1024 bytes) count refers to the number of blocks (1024 blocks) Result Create a 1MB file 1024 blocks, each block has 1024 bytes Put it to the location /extra-swap Initialize all values as 0 Peter Chung (cspeter) 4

Creating a swap file (2/2) Using mkswap and swapon Please note that /extra-swap is created by the command dd in the previous slide Steps mkswap /extra-swap swapon /extra-swap Switch off the swap space: swapoff /extra-swap Peter Chung (cspeter) 5

Class Exercise: Creating a 1GB swap file Steps 1. dd if=/dev/zero of=/extra-swap bs=1024 count=102400 2. mkswap /extra-swap 3. swapon /extra-swap 4. System => Administration => System Monitor Click on the Resources tab You can observe that the swap memory increases swapoff /extra-swap You can observe that the swap memory decreases Peter Chung (cspeter) 6

Swap partition mkswap can also be used to create a swap partition Suppose a partition (e.g. partition number 2) of size 512MB is created on the second SCSI disk fdisk /dev/sdb The partition 2 of /dev/sdb can be made as a swap partition as follows: mkswap /dev/sdb2 swapon /dev/sdb2 Similarly, the swap partition can be removed swapoff /dev/sdb2 Peter Chung (cspeter) 7

Defining a swap partition during boot time A line can be added to a file /etc/fstab to explicitly mark a partition as a swap partition Peter Chung (cspeter) 8

Other memory mgnt commands Q: Please try and explain the meanings of the following commands free top vmstat mtools Peter Chung (cspeter) 9

Workbook exercise Task 4.1: USB flash drive management Hints: Use mcopy in the mtools Task 4.2: Swap partition creation Learn a command df Task 4.3: Report disk usage Learn a command du The TAs will come to your desk and mark your answers on the workbook Peter Chung (cspeter) 10

Backups Peter Chung (cspeter) 11

Why creating backups? Using advanced disk management techniques (e.g. RAID) can t solve any problem For example, the whole computer system can be immersed in water Solution A regular backup to a network drive is automatically carried out during the mid-night If the whole computer system is destroyed Data can still be completely / partially recovered from the network drive Peter Chung (cspeter) 12

Important of backup Recover from Hardware failures Software bugs Human mistakes Natural disasters Peter Chung (cspeter) 13

Criteria of choosing backup medium Cost Reliability Extremely important Speed Relatively less important Availability Usability How often backup you make Peter Chung (cspeter) 14

Important files / directories in Linux /home User home directory /etc System configuration files Some directories are not suitable to backup /proc (some hardware information, automatically generated by Linux Kernel) Peter Chung (cspeter) 15

Backup strategy Full backup Backup everything once Incremental backup Backup the changes incrementally Backup strategy Example of using six tapes Tape 1 Full backup (Fri) Tape 2 to tape 5 Incremental backup (Mon Thu) Tape 6 Full backup (2 nd Fri) Tape 2 to tape 5 - Incremental backup (Mon Thu) The cycle repeats to the tape 1 Peter Chung (cspeter) 16

Backup tools tar Create an archive of a number of files dump Backup the file system restore Restore from a dump Peter Chung (cspeter) 17

Options in tar -c Create a new archive -x Extract an existing archive -f [HOSTNAME:]F A network hostname can be added F stands for an archive file name or a device name -v Verbose. List out the details during the process Example 1: Create an archive to pack up all text files tar cvf output.tar *.txt Example 2: Create a zipped archive tar cvjf output.tar.gz *.txt Example 3: Extract files (zipped or not) from an archive tar xvf output.tar Peter Chung (cspeter) 18

Workbook exercise Task 7.2: tar Task 7.5: tar and compress Task 7.1: dump and restore Quite similar to the tar command Task 7.3: dd Task 7.4: cp r (copy recursively) The TAs will come to your desk and mark your answers on the workbook Peter Chung (cspeter) 19