如何转移VPS文件至外部存储Block Storage
创建Block Storage
https://manager.linode.com/volumes/add
挂载Block Storage
1 2 3 4 5 6 7 8 9 10 11 12 |
To get started with a new volume, you'll want to create a filesystem on it: mkfs.ext4 /dev/disk/by-id/scsi-0Linode_Volume_block2 Once the volume has a filesystem, you can create a mountpoint for it: mkdir /mnt/block2 Then you can mount the new volume: mount /dev/disk/by-id/scsi-0Linode_Volume_block2 /mnt/block2 If you want the volume to automatically mount every time your Linode boots, you'll want to add a line like the following to your /etc/fstab file: /dev/disk/by-id/scsi-0Linode_Volume_block2 /mnt/block2 ext4 defaults,noatime,nofail 0 2 |
拷贝文件夹至Block Storage
1 |
cp -r /var/www/myspots.minirplus.com /mnt/block2/myspots.minirplus.com |
验证是否拷贝成功
删除旧文件夹
1 |
rm -rf /var/www/myspots.minirplus.com |
There are no comments yet