Created
February 18, 2021 14:49
-
-
Save jensens/ac9af68eb16bfbe579e3aa0a20456ce0 to your computer and use it in GitHub Desktop.
Rsync via hard link whole tree of blobs (Plone/Zope)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "COPY DB ----------------------------------------------------------------------" | |
rm -rf latest-pgdb | |
cp -R live-pgdb latest-pgdb | |
chown -R 500.1001 latest-pgdb | |
echo "COPY BLOBS -------------------------------------------------------------------" | |
SOURCE=/data/aaf/live-blobs | |
TARGET=/data/aaf/latest-blobs | |
LINKDEST=`python3 -c "import os.path; print(os.path.relpath('$SOURCE', '$TARGET'))"` | |
rsync -avh --delete-during --link-dest=$LINKDEST $SOURCE/ $TARGET | |
echo "COPY NGINX -------------------------------------------------------------------" | |
SOURCE=/data/aaf/live-nginx-at | |
TARGET=/data/aaf/latest-nginx-at | |
LINKDEST=`python3 -c "import os.path; print(os.path.relpath('$SOURCE', '$TARGET'))"` | |
rsync -avh --delete-during --link-dest=$LINKDEST $SOURCE/ $TARGET | |
SOURCE=/data/aaf/live-static | |
echo "COPY STATIC ------------------------------------------------------------------" | |
TARGET=/data/aaf/latest-static | |
LINKDEST=`python3 -c "import os.path; print(os.path.relpath('$SOURCE', '$TARGET'))"` | |
rsync -avh --delete-during --link-dest=$LINKDEST $SOURCE/ $TARGET | |
echo "DONE ------ ------------------------------------------------------------------" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment