toddfries / backup Goto Github PK
View Code? Open in Web Editor NEWbackup script to be run from cron; backs up via smbclient, dump, tar, etc both local and remote via ssh
backup script to be run from cron; backs up via smbclient, dump, tar, etc both local and remote via ssh
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!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.