Moving destination location safely

There are times when you might want to move your backup data from one location to another for instance if you have found a better or cheaper storage for your backups.

Before you make any changes I recommend you make a copy of your manifest director. On Windows the local data files are all located in the user directory AppData\Local\UnderscoreBackup.

On Unix or OSX if you run as a non-root user the default location of all files will be ~/.underscoreBackup.

If running as root the configuration files will be located in /etc/underscorebackup, the data files will be in /var/cache/underscorebackup.

After this follow the following steps to move a destination.

  1. Make sure your backup is not running and will not start running until you are done with these steps.
  2. Copy all files from your current location to your new location.
  3. Update the destination to point to the new location of your data.
  4. Re-enable your backup.

Unfortunately there is no way to move an existing backup with history into the just released Underscore Backup service because you can not copy files into the service manually in an easy way. You can however just start making a new backup to the Underscore Backup service location. Once the initial backup is completed you can remove your old backups (Assuming you are ok with loosing old versions).

If you want to move to using the Underscore Backup service for future backup data and to keep the manifest in this location while still keeping the history of your backups you can do this following these steps.

  1. Make sure your backup is not running and will not start running until you are done with these steps.
  2. Got into settings and make sure you are connected to the service by clicking the Connect button at the top. Also you are required to have an active subscription.
  3. Go to the Destinations tab and add a new destination with Underscore Backup as the destination.
  4. Go to the Sets tab and change the destination under the Advanced tab to your newly created destination. This will cause future data to be written to the new destination. You can also write data to both if you wish.
  5. Go back to settings and click the Edit Configuration button in the lower left. Find the part of the configuration that says destinations and find the destination ID fro the destination of type "UB". It will most likely be called something like "d1".
  6. Then take that value and change the value for the field "manifest"."destination" to the id of the destination in the previous step. Once done the relevant part of your config should look something like this.
      ...
      "destinations": {
        "d0": {
          "type": "FILE",
          "encryption": "AES256",
          "errorCorrection": "RS",
          "endpointUri": "/var/backups"
        },
        "d1": {
          "type": "UB",
          "encryption": "AES256",
          "errorCorrection": "NONE",
          "endpointUri": "us-west"
        }
      },
      "manifest": {
        "destination": "d1",
      ...
  7. Once that is done go to a command line and execute the following command which will cause Underscore Backup to rewrite the entire manifest log to the new manifest location.
    underscorebackup optimize-log
  8. Restart your backup.

0 comments: