Linux: Restore and delete data
Restore backup
To generate a list of all backed up files for the current folder you are in, the following command is executed as root user:
dsmc q backup "*"dsmc q backup "*" -subdir=yes
Likewise, the command can be carried out for your backed-up file systems, for example /. Should you additionally use the parameter -subdir=yes a very long list may be output. Therefore, use this parameter with caution.
dsmc q backup "/"dsmc q backup "/" -subdir=yes
You can get an overview of existing file systems via:
dsmc q fi
In addition to the last version backed up, there are also several previous versions in the backup, which you can display with the command below:
dsmc q backup test.file -inactive
To restore the last version of the file that was backed up, the
dsmc restore test.file test.file_restore -latest
will be executed. For older versions you can for example use the interactive menu:
dsmc restore test.file test.file_restore -pick
The above commands have always been presented with the option to rename the newly created file (in test.file_restore). If you want to overwrite the one file, you only need the following syntax:
dsmc restore test.file -latest
Open archive
To retrieve a file from the archive, you should first view the file system list of all backed up file systems in the backup as root user:
dsmc q fi
To display all archives in the folder you are currently in, use the syntax:
dsmc q archive "*"
If you want to restore archives outside your current folder, you must either specify the exact path to it or search the entire file system:
dsmc q archive "/home/user/*"dsmc q archive "/*"
To list all backed up files within the archives, use the following command:
dsmc q archive "*" -subdir=yes
To retrieve individual files, it is best to use the interactive menu, which you can start as follows:
dsmc retrieve "*" -pick
To restore entire archives with a specific description, execute the following command:
dsmc retrieve "*" -pick -subdir=yes desc="Archiv_1"dsmc retrieve "*" -pick -subdir=yes desc="2018-01-01"
The description is to the right of the archive/file name and, for archives without a description, consists of the date of the backup day.
Note
The deleting of backup data is deactivated on default e.g. due to possible cyber attacks on your computer. Use the Servicedesk form Zentrales Backup (Central backup, in German) if you need the settings for Deleting backup data to be temporarily or permanently activated.
To remove backed up data from your ISP account, first display a list of the backed up files in the desired folder or file system:
dsmc q backup "*" -inactive -subdir=yesdsmc q backup "/*" -inactive -subdir=yes
To delete folders or files, use the commands listed below, distinguishing between
- all versions,
- only inactive versions (= previous versions or files already deleted on your system) or
- only active versions (= the last saved version of a file that existed on your system at the time of the last backup).
of the files concerned is differentiated:
dsmc del backup "/home/user/*" -deltype=ALLdsmc del backup "/home/user/*" -deltype=INACTIVEdsmc del backup "/home/user/*" -deltype=ACTIVE
Deleting archive data
To remove saved archives from your ISP account, first display the file systems available for your PC and then the corresponding archives in the desired file system:
dsmc q fidsmc q archive "/*"dsmc q archive "/*" -subdir=yes
To delete individual files or folders from all archives, use one of the following commands:
dsmc del archive "/home/user/test.file"dsmc del archive "/home/*" -subdir=yes
If a file or folder is to be deleted from a specific archive only, use the following syntax:
dsmc del archive "/home/user/test.file" -description="Archiv_1"dsmc del archive "/home/*" -subdir=yes -description="2018-01-01"
For the complete deletion of archives with the help of the archive description use:
dsmc del archive "/*" -subdir=yes -desc="Archiv_1"
If an interactive menu is more to your liking, you can also remove the desired files using the following command:
dsmc del archive "/*" -subdir=yes -pick