Create RamDisk & sync it

mkdir /ramdisk
mount -t tmpfs -o size=2048M tmpfs /ramdisk
or copy inside /etc/fstab
tmpfs /media/ramdisk tmpfs rw,size=2048M 0 0
And do :
mount -a
#!/bin/sh
cp -ar /var/www/html/ /ramdisk/
chown -R www-data /ramdisk/html
while true
do
rsync -a –delete /ramdisk/html /var/www/
#chown -R www-data /ramdisk/html
sleep 300;
done
view raw ram_sync.sh hosted with ❤ by GitHub


Laissez un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors