Category Archives: ☢
Perforce backup with rsync
First thing to know, I don’t really want to backup the entire perforce database since it’s huge and requires a lot of extra steps. I’m only backing up the latest version in case a doom fire happens to my apartment.
The scheduled backup is run on my p4 server A, in order to run a scheduled backup plan to push my newest project version to server B.
Create client(aka workspace) for the server A itself.
p4 -d `pwd` client -t Vuth_Auri -o Auri_Backup | p4 client -i p4 client Auri_Backup
Then run a script in crontab.
51 * * * * bash /home/vuth/__backup/runBackup.sh
$cat runBackup.sh
p4 sync rsync -rtz -e "ssh -p 1111 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i /home/vuth/.ssh/id_rsa_somekey" /home/vuth/__backup/p4 vuth@123.123.123.123:/home/vuth/p4
First line get the latest version of your project to the workspace.
Second line runs rsync over a ssh connection to your remote server B.
And that’s it. Notice that this is incremental. You can add –delete to the rsync command to remove garbage from remote server B. I left it for extra safety.
叽
一年多没更新了,来一发。
之前的《神叽的阿米拉串》,不太想发public,不过反正博客没人看。
文件名是14年的,对时间的感知越来越快(或者说慢)。
“Wait for your 30s. You’re fucked.”
Filming实在没法直接找到partner,暂时游戏业停靠中。目前Unity,在学Unreal做自己的demo,想法很多时间太紧。
Asirikuy的交易framework很不错,在用,没停。
本想接着作配乐讲
迷途巫女的慌张
剩的mana只够召唤
一包辣条 怎么办
Continue reading
『VFX练习册』猎头蟹的正确食用方式
Bukkit定时重启bash脚本,GNU Screen走着
Bukkit服务器我一直用GNU Screen跑,隔两天有时候会不稳定要重启。好麻烦根本就不关心为什么,搞定就行。有bukkit插件可以实现但是咱多没自尊用那个。虽然感觉bash操作Screen也挺邋遢的.. 但是好用!其实不然的话怎么操作后台,nohup倒腾输入流什么的太麻烦了,这种用途还是terminal模拟器好看。
#!/bin/bash #/home/bukkit/restart.sh i=0 while (( $i < 5 )) do if [ "`ps aux|grep -e '^bukkit'|grep SCREEN`" != "" ]; then su bukkit -c 'screen -S bukkit -X stuff 'stop`echo -ne '\015'`'' #`echo -ne '\015'` 等于敲下回车 echo "`date` restart.sh:" 'Stoping bukkit...' ((i+=1)) sleep 5 else ((i+=100)) fi done if (( $i == 100 )); then echo "`date` restart.sh:" 'Bukkit was not running. Starting...' fi if (( $i == 5 )); then kill `ps aux|grep bukkit|awk '{print $2}'` echo "`date` restart.sh:" 'Forcibly killing bukkit...' sleep 1 fi if [ "`ps aux|grep -e '^bukkit'|grep SCREEN`" != "" ]; then echo "`date` restart.sh:" "ERROR: Couldn't stop bukkit. Exiting." exit 1 fi bash /home/bukkit/start.sh exit 0
『冰果』主题曲(雾) 吉他独奏 BWV 1007
巴赫大提琴组曲 BWV1007, Prelude
基本没接触过古典,两个月前还觉得这首并不是很难嘛。我啊,naive。
Youtube | acfun传送门 | bilibili传送门
赤影战士(水上魂斗罗) 吉他medley | Shadow of the Ninja (Kage)
副手技能装备完成 Youtube | acfun传送门 | bilibili传送门
没有X11的Linux实现远程键盘共享
How to share keyboard/mouse in Linux without X11 environment
Continue reading