Cloning/Droplet

From Freephile Wiki
< Cloning
Revision as of 14:31, 7 June 2023 by Admin (talk | contribs)
Jump to navigation Jump to search

In 2023 I faced and interesting challenge to update / upgrade an online system that was unmaintained for several years. The target system is a Digital Ocean "droplet" - which is a container-based system but proprietary. Digital Ocean does not provide any tools, mechanisms or advice about transferring Droplets externally.

I ran across an interesting article, which I did not try, that uses block-level copying via DD. https://www.secretbatcave.co.uk/software/exporting-digital-ocean-imagesdroplets-to-xenkvmvmware/

The method I did use was to rsync the data to my private host. Following the example of https://gist.github.com/amalmurali47/c58ef024683cccd242625995b45b7b72

rsync 
    -a # archive mode (all files, with permissions, etc.)
    -A # preserve ACLs/permissions (not included with -a)
    -X # preserve extended attributes (not included with -a)
    -H # preserve hard links (not included with -a)
    -v # verbose, mention files
    --append-verify # if the files differ in modification or other timestamps, it will overwrite the target with the source without scrutinizing those files further
    --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"} 
    my-droplet-host:/ ./targetDir/