Base de Conhecimento

The backups_list_user_files Script  Imprimir este Artigo

Overview:

The /usr/local/cpanel/scripts/backups_list_user_files script locates a user’s backup files and returns all of the backup files in the Comma-Separated Value (CSV) format.

Run the script

To query and return a list of backup files, run the following command as the root user:

/usr/local/cpanel/scripts/backups_list_user_files [arguments]

 

Arguments

The /usr/local/cpanel/scripts/backups_list_user_files script accepts the following arguments:

Arguments Description Input values Example
--user=[username] The user whose backup files you wish to query. The cPanel account’s username. --user=username
--regexp=[string] Returns the regular expression search results.
Note:
This argument only accepts one search value.
A valid string. --regexp='example'

Example

For example, the following command uses the --regexp argument to return results for the username user that match the example value:

/usr/local/cpanel/scripts/backups_list_user_files --user=username --regexp='example' |tail -n 8

The system will return the following output:

1
2
3
4
5
6
7
8
"Thu Jan  1 00:00:00 1970",0,incremental,"/nvdata","/backup/weekly/2018-03-26/accounts/username/homedir/nvdata",DIR
"Tue Feb 23 21:15:00 2016",183,incremental,"/nvdata.cache","/backup/weekly/2018-03-26/accounts/username/homedir/nvdata.cache",FILE
"Tue Feb 23 21:15:00 2016",31,incremental,"/nvdata/icFAA","/backup/weekly/2018-03-26/accounts/username/homedir/nvdata/icFAA",FILE
"Mon Aug  7 21:02:00 2017",59,incremental,"/nvdata/optionselect_filemanager","/backup/weekly/2018-03-26/accounts/username/homedir/nvdata/optionselect_filemanager",FILE
"Thu Jan  1 00:00:00 1970",0,incremental,"/nvdata","/backup/weekly/2018-04-02/accounts/username/homedir/nvdata",DIR
"Tue Feb 23 21:15:00 2016",183,incremental,"/nvdata.cache","/backup/weekly/2018-04-02/accounts/username/homedir/nvdata.cache",FILE
"Tue Feb 23 21:15:00 2016",31,incremental,"/nvdata/icFAA","/backup/weekly/2018-04-02/accounts/username/homedir/nvdata/icFAA",FILE
"Mon Aug  7 21:02:00 2017",59,incremental,"/nvdata/optionselect_filemanager","/backup/weekly/2018-04-02/accounts/username/homedir/nvdata/optionselect_filemanager",FILE

 

Backup file details

The following image displays an example backup file return in CSV format.

 

  • File creation date, in UTC — The file’s creation date in Universal Time Coordinated (UTC).
  • File size — The backup file’s size, in bytes.
  • The backup format type — One of these backup format types:
    • compressed — A compressed tar file.
    • uncompressed — An uncompressed tar file.
    • incremental — A full tree of files and directories.
  • The matching filename from the backup — The file’s path, relative to the /home/username directory.
  • The file’s archive or full path — For compressed and uncompressed backups, the archive path in which the file resides. For incremental backups, the full path to the file.
  • The backup file’s type — One of these backup file types:
    • FILE — A file.
    • DIR — A directory.
    • SYMLINK — A symlink.

Esta resposta foi útil?

Artigos Relacionados

WHM Scripts
Overview: The cPanel & WHM installation process adds important scripts to your server’s...
The dbmaptool Script
Overview: You can use the /usr/local/cpanel/bin/dbmaptool script to grant ownership of databases...
The servers_queue Script
Overview: This script allows you to manage the task queue system. The task queue system allows...
The auto-adjust-mysql-limits Script
Overview: The /usr/local/cpanel/scripts/auto-adjust-mysql-limits script updates MySQL®...
The autossl_check Script
Overview: The /usr/local/cpanel/bin/autossl_check script allows you to manually check the SSL...