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.

704 thoughts on “Perforce backup with rsync

  1. web site

    Have you ever considered publishing an ebook or guest authoring on other
    blogs? I have a blog based on the same ideas you discuss and would love to have you share some stories/information. I know my viewers would appreciate
    your work. If you are even remotely interested, feel free to shoot me an e mail.

    Reply
  2. kra6 at

    you’re really a excellent webmaster. The site loading pace is incredible.
    It kind of feels that you are doing any distinctive trick.
    Also, The contents are masterpiece. you have done a great job on this topic!

    Reply
  3. MALWARE

    Hi, There’s no doubt that your site could possibly be
    having internet browser compatibility problems. Whenever I look at your web site in Safari, it looks fine however, when opening
    in IE, it has some overlapping issues. I just wanted to give you a quick heads up!
    Apart from that, wonderful website!

    Reply
  4. site

    Greate article. Keep posting such kind of info on your blog.

    Im really impressed by it.
    Hello there, You’ve done a fantastic job. I’ll definitely digg it and in my
    opinion suggest to my friends. I’m confident they
    will be benefited from this web site.

    Reply
  5. Ernie

    I will right away grab your rss feed as I can’t to find your e-mail subscription hyperlink or newsletter service.
    Do you’ve any? Kindly permit me understand so that I may just subscribe.
    Thanks.

    Reply
  6. https://onewave.com.my/onewave-solar-water-heater

    Have you ever considered creating an e-book or guest authoring on other websites?
    I have a blog centered on the same subjects you discuss and would love to
    have you share some stories/information. I know my viewers
    would appreciate your work. If you’re even remotely interested, feel free to shoot me
    an e mail.

    Reply
  7. bokep 18+

    Admiring the time and energy you put into your site and detailed information you present.
    It’s nice to come across a blog every once in a while that isn’t the same outdated rehashed information. Excellent read!

    I’ve saved your site and I’m including your RSS feeds to my Google account.

    Reply
  8. xxx

    Have you ever considered publishing an ebook or guest authoring on other websites?
    I have a blog centered on the same information you discuss and would really like to have you share some
    stories/information. I know my subscribers would enjoy your work.

    If you are even remotely interested, feel free to shoot
    me an email.

    Reply
  9. live sex

    I’ve been surfing online more than 2 hours today, yet I never found any interesting article
    like yours. It is pretty worth enough for me.
    In my view, if all site owners and bloggers made good content as you
    did, the internet will be much more useful than ever before.

    Reply
  10. porn

    Hi there! I could have sworn I’ve visited this site before but after browsing through many of the
    posts I realized it’s new to me. Anyhow, I’m definitely delighted
    I found it and I’ll be book-marking it and checking back frequently!

    Reply
  11. https://coub.com/bidathinhkent

    hello!,I really like your writing very much! share
    we keep in touch more approximately your post on AOL?

    I require an expert in this house to resolve my problem.

    Maybe that is you! Taking a look ahead to look you.

    Reply
  12. SITUS SCAM

    Right here is the right webpage for everyone who wishes
    to understand this topic. You realize a whole lot
    its almost tough to argue with you (not that
    I actually will need to…HaHa). You certainly put a
    brand new spin on a subject that’s been written about for a long time.
    Wonderful stuff, just wonderful!

    Reply
  13. website

    I’m no longer certain where you’re getting your info, however great topic.
    I must spend some time learning more or figuring out
    more. Thank you for wonderful info I was on the lookout for this information for
    my mission.

    Reply
  14. live sex

    Thank you, I’ve recently been looking for information approximately this topic for a while and yours is
    the greatest I have came upon so far. However, what about the conclusion? Are you sure about
    the source?

    Reply
  15. WD TIDAK DI BAYAR

    Thanks for your marvelous posting! I genuinely enjoyed
    reading it, you are a great author. I will make certain to bookmark your blog and may come back in the foreseeable future.
    I want to encourage you continue your great posts, have a
    nice morning!

    Reply
  16. vipwin

    Hey, bạn viết tuyệt vời rồi! Mình sẽ
    giới thiệu nhà cái VIPWIN5 cho bạn bè mình.
    Mình tin chắc họ chắc sẽ thích lắm vì khuyến mãi hấp dẫn.
    Website: vipwin5 net n

    Reply
  17. live sex

    Hi there all, here every person is sharing such experience,
    so it’s fastidious to read this web site, and I used to pay a quick visit this web site every day.

    Reply
  18. airport transfer klia

    Its like you read my mind! You appear to know so much about this, like you wrote the book in it or something.
    I think that you could do with a few pics to drive the message home a little bit, but other than that, this is fantastic blog.

    A fantastic read. I’ll certainly be back.

    Reply
  19. Buy Xanax Online

    I really like your blog.. very nice colors & theme.
    Did you create this website yourself or did you hire someone to do it for you?
    Plz answer back as I’m looking to construct my own blog and would like to know where u got this from.
    many thanks

    Reply
  20. what is rice

    Pretty great post. I simply stumbled upon your blog
    and wanted to say that I’ve truly enjoyed browsing your weblog posts.

    After all I will be subscribing for your feed and I am hoping you
    write once more very soon!

    Reply
  21. 7603

    Sweet blog! I found it while browsing on Yahoo News. Do you have any tips on how to get listed in Yahoo News?

    I’ve been trying for a while but I never seem to get
    there! Appreciate it

    Reply
  22. porn

    Hi, i think that i saw you visited my weblog so i came to “return the favor”.I
    am attempting to find things to enhance my site!I suppose its ok to use
    some of your ideas!!

    Reply
  23. live sex

    Hi, I do think this is an excellent site. I stumbledupon it 😉 I’m going to come back once
    again since I book-marked it. Money and freedom is the greatest way to change, may
    you be rich and continue to guide other people.

    Reply
  24. homepage

    Everyone loves what you guys are up too. This kind of clever work and exposure!
    Keep up the amazing works guys I’ve incorporated you guys to
    my own blogroll.

    Reply
  25. uu88

    Hey, UU88 là nhà cái rất chất lượng với trò chơi phong phú.
    Tôi đang chơi thể thao rất ổn. Khuyến mãi tốt lắm, ai đang tìm nhà cái thì đăng ký đi!

    uu88

    Reply
  26. trip scan

    Howdy! Do you know if they make any plugins to help with SEO?
    I’m trying to get my blog to rank for some targeted keywords but I’m not
    seeing very good success. If you know of any please share.
    Thank you!

    Reply
  27. Escorts in Islamabad City

    Hi there! I just wanted to ask if you ever have
    any trouble with hackers? My last blog (wordpress) was hacked and
    I ended up losing several weeks of hard work due to no
    backup. Do you have any solutions to prevent hackers?

    Reply
  28. cabin crew course

    I take pleasure in, cause I discovered just what I
    used to be taking a look for. You’ve ended my four day long hunt!

    God Bless you man. Have a great day. Bye

    Reply
  29. 비아그라

    My spouse and I stumbled over here coming from a
    different website and thought I might check things out.
    I like what I see so i am just following you.
    Look forward to going over your web page again.

    Reply
  30. Go Here

    Greetings from Los angeles! I’m bored to tears at work so I
    decided to browse your website on my iphone during lunch
    break. I enjoy the knowledge you provide here and can’t wait to take a
    look when I get home. I’m shocked at how fast your blog
    loaded on my phone .. I’m not even using WIFI, just
    3G .. Anyhow, fantastic blog!

    Reply
  31. apuestasdeportivasla.com

    Hi there! This is my 1st comment here so I just wanted to give a quick shout out and say I really enjoy reading your articles.
    Can you recommend any other blogs/websites/forums that cover the same subjects?
    Thanks a ton!

    Reply
  32. situs 18+

    Sweet blog! I found it while browsing on Yahoo News.

    Do you have any suggestions on how to get listed in Yahoo News?
    I’ve been trying for a while but I never seem
    to get there! Thank you

    Reply
  33. 드라마 다시보기

    My developer is trying to convince me to move
    to .net from PHP. I have always disliked the idea because of the expenses.
    But he’s tryiong none the less. I’ve been using Movable-type on various websites for
    about a year and am concerned about switching to another platform.
    I have heard good things about blogengine.net.
    Is there a way I can transfer all my wordpress content into it?
    Any help would be greatly appreciated!

    Reply
  34. web site

    Every weekend i used to pay a quick visit this site, because i
    wish for enjoyment, since this this web page conations really pleasant funny data too.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *