User Tools

Site Tools


archive:backup

backup partition

d5 d6 d7 d8
avalon007
baixue
fanyx
hg
jingyi
liun
lixinming
panying
sunjh
yxue
zhangyj
zhouqiao

backup list format

$cat panying.backup
red:/home/panying/work/csp 
red:/mnt/d2/panying/others/lx md
  • pls note that the name must be usrname.backup,for example:avalon007.backup
  • if some md must be backup,add 'md' tag at the end of your list
  • memory quota is limited!2T for each user!
  • water must be preprocess otherwise, quota would be restricted!

Protocol for backuping your data

0,buy a disk

1,format and partition your mobile drive

	    --> install the a tool for formating ext4:[[http://www.diskgenius.cn/|diskgenius]]
            -install
            -format this into ext4
 
  • or you just use our server to do this
    • 先用sudo cfdisk找到应该格式化那个分区,假设是/dev/sdc3,然后用下面的命令格式化
          * sudo mkfs.ext4 /dev/sdc3

2,after insert your disk into rainbow,you need to mount your disk

dmesg|tail    #check if disk can be detected
	#generally speaking, sda/sdb would be "home" and "d2" respectively
sudo cfdisk /dev/sdc
	#to check which one is ext4 format
pmount /dev/sdc2 py
cd /media/py
sudo chown panying:xue /media/py
	# in case any permission denied would occur
	#can skip if the owner is yourself
        sh download.sh &

		$cat download.sh
		#!/bin/bash
		
		rsync -avz /home/panying /media/py/rainbow --exclude-from=/home/panying/cmd/exclude.me
		
		$cat exclude.me
		.AppleDouble
		2rr
		2ri
		2ir
		2ii
		1r
		1i
                nc
                dcd


	#Exclude *.dcd和*.nc。
	#making increment backup
pumount py    #unmout

3,install a tool for reading your data in windows/macs

windows: linuxreader mac: paragon

4,backup your data on your own

  • first please remember last time which server your disk was mounted.
  • If your disk was mounted on red,please mount it on red this time.
  • then check which disk has already existed.
    • ls /dev/sd(TAB)
    • eg: if there is only /dev/sda(|b|c)/
      • then your disk would be /dev/sdd when you put it in one of our server
  • mount your disk
    • pmount /dev/sdd3 py
  • backup your data from server to /media/py
    • rsync ****
  • exit the current window
  • you can still backup your data from red using rsync -avz panying@red: even your disk is currently mounted on rainbow.
  • unmount
    • pumount /media/py 

Troubleshooting

disk is empty

  try mount another partition
  *eg: /dev/sdd3 is currently mounted as py
  *punmout /media/py
  *pmount /dev/sdd2 py

device is busy

        # umount /media/disk/
          umount: /media/disk: device is busy
          umount: /media/disk: device is busy
  • First thing you need to do is to close all your terminals
  • If it does't work,you can use the fuser command to find out which process was keeping the device busy:
         # fuser -m /dev/sdc1
         /dev/sdc1: 538
        # ps auxw|grep 538
         donncha 538 0.4 2.7 219212 56792 ? SLl Feb11 11:25 rhythmbox
  • Rhythmbox is the culprit! Close that down and umount the drive. Problem solved!

accidentally disconnected

        during data backup, fail to read /media/py anymore
        mount failed due to disconnect accidentally.
       *see if /media/py is still mounted:  df -h
       *if it is,force to unmout:sudo umount /media/py
       *remove: rmdir /media/py
       *rmdir only remove empty directory!
archive/backup.txt · Last modified: 2019/10/03 18:27 by 127.0.0.1