SysAdmin‎ > ‎


Backup script is located on policoro at /home/tonyz/Desktop/backupScript and uses backup.lock for flock method of preventing two instances running at the same time.

Backup logs are located on policoro at /home/users/tzhao/Desktop/rsync_logs
Backup logs should be renamed to month when a new month begins to prevent a big log file.

Backups for the following users are scheduled everyday at 8:00PM on root crontab on policoro:
egallicchio bfzhang htancredi dkilburg rajat dimarino tzhao

The backups consist of the users entire folder. Backup folders for these users are located on maratea in the users respective folders. The folder is named backup with the addition of the username in caps so it would be backupTZHAO for tzhao. Each user has backup folders for the backup incase a file that was changed or deleted is needed. They will have the date on the folder of files that were changed from the previous back up. These need to be manually deleted every week or biweekly or a script needs to be made to delete them at a scheduled time.

Backups for the async_re folder on maratea is scheduled every Saturday at 8:00PM (also done by backupScript above).

Backup folder for async_re is located on the external hard drive connected to policoro. No maintenance is needed.

Backups for the virtual machine needs to be done manually every month:

  • ssh boincadm@

  • crontab -e // add # in front of the job

  • cd projects/boincimpact

  • bin/stop

  • ps auxw | grep python // copy down all the running python jobs as they will be killed when the VM shuts down

  • sudo shutdown -h now

  • ssh -X maratea // -X needed if you need to check on virtual box GUI

  • su // become root user

  • virtualbox // if needed to check on virtualbox GUI

  • rsync -av /home/emilio/VirtualBox\ Vms/debian-7-boinc-server/ /home/backupVBOX

    // backup virtual machine to a temp folder

  • VBoxHeadless --startvm "debian-7-boinc-server" -vrde off &

  • ssh boincadm@

  • cd projects/boincimpact

  • bin/start

  • crontab -e // remove # from job

Add python jobs back

Rsync the backupVBOX on maratea to the external hard drive on policoro

From tonyz account on policoro:

  • ssh tzhao@maratea

  • su

  • cd /home

  • rsync -av backupVBOX tonyz@


backup scripts:

  what follows is a changelog over Tony's backup scripts:

    * all backup scripts now located in policoro:/opt/bin and run as backupadm
backupadm must be able to ssh into a given user on their respective machine by the virtue of ssh keys

    * backups run from /etc/crontab

    * backup scripts for home directories and async_re are two separate files/cron jobs
    * logs are located in /var/log/backup
    * lock files moved to /var/lock
    * some home directories backup script improvements:
      - now loops over set of users instead of issuing individual commands
      - gets users' home servers/directories from /etc/auto.nfs
      - parametrized backup machine ip address
      - logfiles stored locally on policoro (not over nfs)
      - logfiles are saved for each individual rsync invocation and bzipped
      - the only things that are executed on the remote machine are rsync and echo
      - canonical use of flock
    * async_re backup script improvements:
      - storing logs in the same place as home directories
      - canonical use of flock