backup

How to properly back up Docker volumes?

My problem was to develop a backup strategy for a running Linux server with multiple docker containers which used docker volume to store data. The problem was that it’s not trivial to just tar an volume like an bind mount. The recommended way to achieve this is to first launch a new container and mount the volume from the running container. Then to mount an local host directory as e.g. “/backup” and finally to pass a command that tars the contents of the data volume to a backup.tar file inside our “/backup” directory.

Can also backup your Gdocs by:
1. Connecting to your Gdrive account
2. Selecting the files to backup
3. Download them
4. zip them and store them.

Taggings:

Use mongodump and mongorestore to backup and restore MongoDB databases

In order to make a backup of the local MongoDB one can use the mongodump program. This program is a command line tool that allows to dump the complete or partial content of a MongoDB instance to some file.
To create such a dump one simply calls the mongodump binary. It takes a multitude of different parameters, where the most importatnt ones are:

  • --host HOSTNAME:PORT which defaults to localhost:27017
  • --username USERNAME
  • --password PASSWORD
  • --db DATABASE_NAME if not specified all databases are dumped
  • --collection COLLECTION_NAME needs --db to be specified, and if omitted all collections are dumped
  • --query QUERY only dumps objects matching the query
  • --out PATH if ommited the programs dumps the database to ./dump/

After dumping the database one can then use the created file(s) and copy them into a directory under version control or simply send them to other people. If one receives such a database dump one can use the mongorestore program in order to restore the database.
Again one simply has to call the mongorestore binary with the desired parameters. The most important ones are the same as for the mongodump except that it does not accept a query or out parameter, instead one can specify a --dir PATH paramter to tell the program there to look for the dump files and a --drop parameter that instructs the program to drop the old database.

Use mongodump and mongorestore to backup and restore MongoDB databases

In order to make a backup of the local MongoDB one can use the mongodump program. This program is a command line tool that allows to dump the complete or partial content of a MongoDB instance to some file.
To create such a dump one simply calls the mongodump binary. It takes a multitude of different parameters, where the most importatnt ones are:

  • --host HOSTNAME:PORT which defaults to localhost:27017
  • --username USERNAME
  • --password PASSWORD
  • --db DATABASE_NAME if not specified all databases are dumped
  • --collection COLLECTION_NAME needs --db to be specified, and if omitted all collections are dumped
  • --query QUERY only dumps objects matching the query
  • --out PATH if ommited the programs dumps the database to ./dump/

After dumping the database one can then use the created file(s) and copy them into a directory under version control or simply send them to other people. If one receives such a database dump one can use the mongorestore program in order to restore the database.
Again one simply has to call the mongorestore binary with the desired parameters. The most important ones are the same as for the mongodump except that it does not accept a query or out parameter, instead one can specify a --dir PATH paramter to tell the program there to look for the dump files and a --drop parameter that instructs the program to drop the old database.

Use mongodump and mongorestore to backup and restore MongoDB databases

In order to make a backup of the local MongoDB one can use the mongodump program. This program is a command line tool that allows to dump the complete or partial content of a MongoDB instance to some file.
To create such a dump one simply calls the mongodump binary. It takes a multitude of different parameters, where the most importatnt ones are:

  • --host HOSTNAME:PORT which defaults to localhost:27017
  • --username USERNAME
  • --password PASSWORD
  • --db DATABASE_NAME if not specified all databases are dumped
  • --collection COLLECTION_NAME needs --db to be specified, and if omitted all collections are dumped
  • --query QUERY only dumps objects matching the query
  • --out PATH if ommited the programs dumps the database to ./dump/

After dumping the database one can then use the created file(s) and copy them into a directory under version control or simply send them to other people. If one receives such a database dump one can use the mongorestore program in order to restore the database.
Again one simply has to call the mongorestore binary with the desired parameters. The most important ones are the same as for the mongodump except that it does not accept a query or out parameter, instead one can specify a --dir PATH paramter to tell the program there to look for the dump files and a --drop parameter that instructs the program to drop the old database.

Taggings:

Use rsync and duplicity together with ssh-keys for remote secure backup

On Ubuntu:

First:

  • sudo apt-get install rsync
  • sudo apt-get install duplicity

    Then:

  • Create your ssh-key key pair (public/private).
  • Copy the public key to the remote server and add it to the authorized_keys section there
  • rsync -avz * myuser@myremote.server.com:/backup/dir/
  • duplicity --verbosity info --allow-source-mismatch /data/to/backup/securly/also/with/encrypted/transfer/ rsync://myuser@myremote.server.com//backup/dir/for/encrypted/backups/

    Finally:
    To automate this with periodic execution, use "crontab"-entries, and/or add logic process functionality by using shell scripts.

  • Taggings:

    Automated remote backups in Linux

    A lot of data is stored on publicly available drives/shares. These consist a definite value and need to be secured to pertain their value in case of service interruption or the like. So a reliably tool is required, which automates this daily task without user invention. What are recommendations in this area?

    iPhone - Extract Address Book Contacts, Save SMS and iMessages

    If you have lost your phone or if its damaged and you need your contacts from iPhone Backup, it is possible to read the needed information. But you need also the information if you have encrypted your backupfile. Some applications dont support encrypted iPhone Backupfiles. In this goal we want to extract only contacts. Therefore we install a programm so called "iPhone Backup Viewer".

    DropBox folder sync Software

    The solution is a little Program, for Windows, called “Dropbox Folder Sync”. You can find it on the following Homepage: http://satyadeepk.in/dropbox-folder-sync/. It’s freeware and only needs an NTFS partition with DropBox installed on it. It works up from Windows XP and only requires .NET framework 4.0.
    Once installed, you would be able to Sync/Unsync each folder with an right click on it. “Dropbox Folder Sync” will then copy this folder to your DropBox folder, and create an symbolic link on the same location with the junction utility.

    How to sync folders with DropBox more simply !

    DropBox is a nice tool and offers many features compared to other web space services. But it offers no advanced synchronization features for your OS. I have many folders such as my Firefox Bookmarks, University Files, etc., which I would like to backup in DropBox in order to use them, always up to date, on my PCs and Laptop. Of course, I could copy each folder manually to my DropBox folder, but that’s not what I call user friendly. I want an more efficient way to manage my synchronizations with DropBox.

    Pages

    Subscribe to backup