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.

696 thoughts on “Perforce backup with rsync

  1. rape videos

    I used to be suggested this website by my cousin. I’m not sure whether
    this put up is written by means of him as nobody else realize such distinct about my difficulty.
    You’re wonderful! Thank you!

    Reply
  2. gay porn video

    We’re a gaggle of volunteers and starting a brand new scheme in our community.
    Your web site provided us with useful info to work on. You have done an impressive task and
    our whole community might be thankful to you.

    Reply

Leave a Reply

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