All Projects → TheChymera → Mkstage4

TheChymera / Mkstage4

Licence: gpl-3.0
Bash Utility for Creating Stage 4 Tarballs

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to Mkstage4

compose-dump
Dump and restore Docker Compose-projects
Stars: ✭ 14 (-74.55%)
Mutual labels:  backup, archiving
Libarchive
Multi-format archive and compression library
Stars: ✭ 1,625 (+2854.55%)
Mutual labels:  backup, archiving
Bareos
Main repository with the code for the libraries and daemons
Stars: ✭ 651 (+1083.64%)
Mutual labels:  backup, archiving
Wal G
Archival and Restoration for Postgres
Stars: ✭ 1,974 (+3489.09%)
Mutual labels:  backup, archiving
Wal E
Continuous Archiving for Postgres
Stars: ✭ 3,313 (+5923.64%)
Mutual labels:  backup, archiving
Pg probackup
Backup and recovery manager for PostgreSQL
Stars: ✭ 383 (+596.36%)
Mutual labels:  backup, archiving
Pgbackrest
Reliable PostgreSQL Backup & Restore
Stars: ✭ 766 (+1292.73%)
Mutual labels:  backup, archiving
Cassy
A simple and integrated backup tool for Apache Cassandra
Stars: ✭ 33 (-40%)
Mutual labels:  backup
Mva Overlay
mva's sandbox overlay
Stars: ✭ 40 (-27.27%)
Mutual labels:  gentoo
Threecopies
Hosted Server Backup Service
Stars: ✭ 31 (-43.64%)
Mutual labels:  backup
Crocoite
Web archiving using Google Chrome
Stars: ✭ 30 (-45.45%)
Mutual labels:  archiving
Static Filez
Build compressed archives for static files and serve them over HTTP
Stars: ✭ 33 (-40%)
Mutual labels:  archiving
Hypervbackup
Utility for backing up HyperV virtual machines
Stars: ✭ 43 (-21.82%)
Mutual labels:  backup
Vuplicity
A cross-platform GUI for Duplicity backups, powered by Atom Electron.
Stars: ✭ 31 (-43.64%)
Mutual labels:  backup
Resticprofile
Configuration profiles for restic backup
Stars: ✭ 48 (-12.73%)
Mutual labels:  backup
Netflix Ratings Extractor
Greasemonkey script for Chrome, Firefox, Safari: export your rated Netflix movies.
Stars: ✭ 30 (-45.45%)
Mutual labels:  backup
Gphotos Sync
Google Photos and Albums backup with Google Photos Library API
Stars: ✭ 1,066 (+1838.18%)
Mutual labels:  backup
Unburden Home Dir
Automatically unburden $HOME from caches, etc. Useful for $HOME on SSDs, small disks or slow NFS homes. Can be triggered via an hook in /etc/X11/Xsession.d/.
Stars: ✭ 48 (-12.73%)
Mutual labels:  backup
Scm Backup
Makes offline backups of your cloud hosted source code repositories
Stars: ✭ 38 (-30.91%)
Mutual labels:  backup
Stash
🛅 Backup your Kubernetes Stateful Applications
Stars: ✭ 989 (+1698.18%)
Mutual labels:  backup

mkstage4

CI

This is a Bash script to create stage 4 tarballs either for the running system, or a system at a specified mount point. The script was inspired by an earlier mkstage4 script by Greg Fitzgerald (unmaintained as of 2012) which itself was a revamped edition of the original mkstage4 by Reto Glauser (unmaintained as of 2009).

More information on mkstage4 can be found on the following blogs, though instructions may be outdated compared to the current version, best documented by this README file:

Installation

The script can be run directly from its containing folder (and thus, is installed simply by downloading or cloning it from here - and adding run permissions):

git clone https://github.com/TheChymera/mkstage4.git /your/mkstage4/directory
cd /your/mkstage4/directory
chmod +x mkstage4.sh

For Gentoo Linux and Derivatives, mkstage4 is also available in Portage via the base Gentoo overlay. On any Gentoo system, just run the following command:

emerge app-backup/mkstage4

Usage

If you are running the script from the containing folder (first install method) please make sure you use the ./mkstage4.sh command instead of just mkstage4!

Archive your current system (mounted at /):

mkstage4 -s archive_name

Archive a system located at a custom mount point:

mkstage4 -t /custom/mount/point archive_name

Command line arguments:

mkstage4.sh [-q -c -b -l -k -p] [-s || -t <target-mountpoint>] [-e <additional excludes dir*>] <archive-filename> [custom-tar-options]
  -q: activates quiet mode (no confirmation).
  -c: excludes connman network lists.
  -b: excludes boot directory.
  -l: excludes lost+found directory.
  -p: compresses parallelly using pbzip2.
  -e: an additional excludes directory (one dir one -e).
  -s: makes tarball of current system.
  -k: separately save current kernel modules and src (creates smaller archives and saves decompression time).
  -t: makes tarball of system located at the <target-mountpoint>.
  -C: specify tar compression (shows available on runtime and default is bz2)
  -h: displays help message.

System Tarball Extraction

Single-threaded

Tarballs created with mkstage4 can be extracted with:

tar xvjpf archive_name.tar.bz2

To preserve binary attributes and use numeric owner identifiers (considered good practice on Gentoo), you can simply append the relevant flags to the respective tar commands, e.g.:

tar xvjpf archive_name.tar.bz2 --xattrs-include='*.*' --numeric-owner

If you use the -k option, extract the src and modules archives separately:

tar xvjpf archive_name.tar.bz2.kmod
tar xvjpf archive_name.tar.bz2.ksrc

Multi-threaded

If you have a parallel de/compressor installed, you can extract the archive with one of the respective commands:

pbzip2

tar -I pbzip2 -xvf archive_name.tar.bz2 --xattrs-include='*.*' --numeric-owner

xz

tar -I 'xz -T0' -xvf archive_name.tar.xz --xattrs-include='*.*' --numeric-owner

gzip

Similarly to other compressors, gzip uses a separate binary for parallel decompression:

tar -I unpigz -xvf archive_name.tar.gz --xattrs-include='*.*' --numeric-owner

Dependencies

Please note that these are very basic dependencies and should already be included in any Linux system.

Optionals: If one the following is installed the archive will be compressed using multiple parallel threads when available, in order of succession:


Released under the GPLv3 license. Project led by Horea Christian (address all correspondence to: [email protected]).

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].