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
view raw ram_disk_create.sh hosted with ❤ by GitHub
#!/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 de messagerie ne sera pas publiée.

Search
Generic filters
Exact matches only
Filter by Custom Post Type