Last active
September 9, 2018 18:00
-
-
Save daedric/3c436e069d925a03f183f12b69022434 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/bash | |
set -e | |
# Stop dropbox first ! | |
dd if=/dev/zero of=dropbox-volume bs=1M count=3072 | |
mkfs.ext4 dropbox-volume | |
sudo mount dropbox-volume Dropbox2 | |
sudo chown $USER Dropbox2 | |
sudo chown $USER Dropbox2/lost+found | |
rsync --partial --progress --recursive --remove-source-files Dropbox/ Dropbox2/ | |
mv Dropbox Dropbox.old | |
sudo umount Dropbox2 | |
mv Dropbox2/ Dropbox/ | |
# Now we can mount the volume on the final destination. | |
sudo mount dropbox-volume Dropbox | |
# you can start dropbox now. fstab for automatic mounting is not covered |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment