mirror of
https://gitea.blesmrt.net/mikaela/gist.git
synced 2024-11-01 16:09:23 +01:00
16 lines
506 B
Bash
16 lines
506 B
Bash
|
#!/usr/bin/env bash
|
||
|
# This is just a simple script to backup VMCs in case something goes wrong
|
||
|
set -x
|
||
|
|
||
|
VMCDIR=~/PS2/VMC
|
||
|
BACKUPDIR=~/PS2-VMC-backups
|
||
|
|
||
|
mkdir -p $BACKUPDIR
|
||
|
# E.g. 2023-075TT1719, I don't think change of month matters and these are
|
||
|
# going to be small 8MB files anyway so seeing the age at glance is nice.
|
||
|
# WARNING: This doesn't handle DST switch althůgh I don't expect to be
|
||
|
# playing or running this script during the problem hours
|
||
|
cp -rv "$VMCDIR" "$BACKUPDIR/$(date +%Y-%jT%H%M)"
|
||
|
|
||
|
set +x
|