mgsautils.git
8 years agosnapshot-rootfs.sh, vmhost-status.sh: New path for btrfs binary
MegaBrutal [Thu, 4 Feb 2016 11:23:06 +0000 (12:23 +0100)]
snapshot-rootfs.sh, vmhost-status.sh: New path for btrfs binary

With Ubuntu 15.10, the path of the btrfs binary has changed from /sbin/btrfs to /bin/btrfs.
Therefore, I stopped referring to the binary by full path.
While /bin is in the PATH by default on Ubuntu 15.10 (even for cron jobs),
on older Ubuntus or other distros, you may possibly need to
add /sbin or /bin to the PATH for these scripts.

modified:   fs/snapshot-rootfs.sh
modified:   host/vmhost-status.sh

8 years agobackup_diff.sh, backup_full.sh: Prepared for in-place backups
MegaBrutal [Tue, 29 Sep 2015 03:22:36 +0000 (05:22 +0200)]
backup_diff.sh, backup_full.sh: Prepared for in-place backups

- Added option CLEAN_DIR to backup_fsdiff.conf which enables/disables
purging of the backup directory whenever a new full backup is made.
Previously, the hard-coded behavior was to purge the $STORAGE directory.

- MD5 checksum is now only counted for the recently made backup file.
Previously, all checksums were recalculated.

Now it is possible to have the main backup repository mounted at $STORAGE
and keep several weeks (or whatever backup cycle you have) of backups there.
With previous versions of the script, you were supposed to transfer those
files to a remote server, while the local $STORAGE directory was only used as
temporary storage. Now you can even mount $STORAGE directly from the remote
server through NFS or iSCSI, if that is more convenient for you.

modified:   backup_diff.sh
modified:   backup_fsdiff.conf
modified:   backup_full.sh

8 years agobackup_diff.sh, backup_full.sh: Cleaned up for publication, added rsync transfer...
MegaBrutal [Wed, 2 Sep 2015 20:32:55 +0000 (22:32 +0200)]
backup_diff.sh, backup_full.sh: Cleaned up for publication, added rsync transfer mode

- Moved hard-coded data to separate config file.

- Now it is configurable how to transfer backup files to a remote server:
it is possible by scp or rsync, or to not transfer them at all.
The backup directory may be mounted from a remote server by NFS or other method,
in which case there is no need to transfer the files by scp or rsync.

Note however, backup_full.sh purges the backup directory, because it is assumed
that the files have already been transferred to a remote location.

modified:   fs/backup_diff.sh
new file:   fs/backup_fsdiff.conf
modified:   fs/backup_full.sh

8 years agobackup.sh: Clean up junk if tar creation fails
MegaBrutal [Thu, 20 Aug 2015 05:31:48 +0000 (07:31 +0200)]
backup.sh: Clean up junk if tar creation fails

If the file system gets full during tar creation, and the junk files (SQL dumps, partial TAR) stay there, the file system is left with 100% usage.
This may have very unpleasant consequences, so it's best to simply remove those files.

modified:   mysql/backup.sh

8 years agomysqlbak_check.sh: Truncate file list and show summary
MegaBrutal [Sat, 15 Aug 2015 02:52:28 +0000 (04:52 +0200)]
mysqlbak_check.sh: Truncate file list and show summary

Changed MySQL backup check script to truncate file lists (only show 20 files of the most recent and the oldest backups) and show statistics (file number and summarized
size) at the end of each directory listing.

modified:   mysqlbak_check.sh

8 years ago Initial commit
MegaBrutal [Tue, 4 Aug 2015 02:23:54 +0000 (04:23 +0200)]
 Initial commit

 Changes to be committed:
new file:   fs/backup_check.sh
new file:   fs/backup_check_FreeBSD.sh
new file:   fs/backup_diff.sh
new file:   fs/backup_full.sh
new file:   fs/snapshot-rootfs.sh
new file:   host/check-fs-usage.sh
new file:   host/vmhost-status.sh
new file:   mysql/backup.sh
new file:   mysql/mysqlbak_check.sh
new file:   smf/check_smf_pending_users.sh
new file:   smf/mail_user_profile.sh
new file:   smf/smf_fetch_user_profile.sh