Linux/SimpleBashBackup: Difference between revisions
< Linux
Line 23: | Line 23: | ||
== example jobs == | == example jobs == | ||
=== single folder === | === single folder === | ||
==== weak compression ==== | |||
<pre> | |||
ARCHIV="$BACKUPDIR/${FILEDESC}_server_srv_www.tar.gz" | |||
tar -c /srv/www | pigz --best > $ARCHIV | |||
</pre> | |||
==== strong compression ==== | |||
<pre> | |||
ARCHIV="$BACKUPDIR/${FILEDESC}_server_srv_www.tar.7z" | |||
tar -c /srv/www | 7z a -m0=lzma2 -mx9 -si $ARCHIV | |||
</pre> | |||
=== multiple folders === | === multiple folders === | ||
=== clean old backups === | === clean old backups === | ||
=== rsync backups to other server === | === rsync backups to other server === |
Revision as of 17:03, 3 June 2016
folder structure
/srv /backup /backupmanager.sh /01_daily-jobs /02_weekly-jobs /03_monthly-jobs /templates /tmp /backup-data /01_daily /02_weekly /03_monthly
backupmanager.sh
example jobs
single folder
weak compression
ARCHIV="$BACKUPDIR/${FILEDESC}_server_srv_www.tar.gz" tar -c /srv/www | pigz --best > $ARCHIV
strong compression
ARCHIV="$BACKUPDIR/${FILEDESC}_server_srv_www.tar.7z" tar -c /srv/www | 7z a -m0=lzma2 -mx9 -si $ARCHIV