Coder Social home page Coder Social logo

backup's Introduction

Requirements:

	dump, gzip, stat, restore, bc, ssh
	optionally smbclient, openafs, lzma

To setup this backup script, decide on a name for the collection of
backups to run together as well as the directory backups should be
archived to and paste this shell code to a root ksh shell:

  collection=mysite
  datadir=/backups
  mkdir -p /etc/backup/$collection
  echo datadir=$datadir > /etc/backup/$collection/conf
  useradd -d /home/.backup -g =uid -m -s /bin/sh -G operator _backup

Systems to be backed up may be samba shares or remotely dumped systems via ssh.

Remote systems via ssh:


	backup-addhost $collection hostname	
		.. this will create a ssh hostkey, and give instructions on
		   placing it in the remote users .ssh/authorized_key file
	  	.. watch /var/log/authlog for IP coming from
		.. verify key of remote host

	  useradd -d /home/.backup -g =uid -m -s /bin/sh -G operator _backup

	add the single line to /etc/backup/$collection/dumplist

		sshdump://_backup@hostname/var

	to backup on hostname via user _backup the /var directory.

Remote systems via samba:

	create a file /etc/backup/$collection/hostname_smbauthAUTH01
	contents should be:

		username = sambauser
		password = sambapass
		domain = workgroupdomainname

	add the single line to /etc/backup/$collection/dumplist

		smb://AUTH01@hostname/sharename

	to backup on hostname via perms in the AUTH01 file the sharename share.

	In the event a sharename or subdir requires a space (Windows users are notorious for this!), use
	'%SPACE%' to indicate a space in the path.

Unlike amanda, this system does not require write privileges to samba shares,
nor does it muck with /etc/dumpdates, nor a rocket science degree to run.

With the preliminaries above out of the way, run this program as follows:

	su -m _backup -c "/usr/local/sbin/backup $collection"

Enjoy!

backup's People

Contributors

toddfries avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.