格式成NTFS的64G盘插到USB上然后sudo fdisk -l
Disk /dev/sda: 59.4 GiB, 63753420800 bytes, 124518400 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x6e697373 Device Boot Start End Sectors Size Id Type /dev/sda1 ? 1936269394 3772285809 1836016416 875.5G 4f QNX4.x 3rd part /dev/sda2 ? 1917848077 2462285169 544437093 259.6G 73 unknown /dev/sda3 ? 1818575915 2362751050 544175136 259.5G 2b unknown /dev/sda4 ? 2844524554 2844579527 54974 26.9M 61 SpeedStor Partition table entries are not in disk order.
安装NTFS支持包sudo apt-get install ntfs-3g
挂在u盘sudo mount -t auto /dev/sda /media
cd /media mkdir backup sudo apt-get install rsync rsync -av --delete /home/pi/work/ /media/backup/
可以放到计划任务中去,定时刷新同步
也可以免密码同步
rsync -av --delete /home/pi/test user@network:/home/user/backup/